mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 10:32:27 +08:00
fix(in-app-help): jumping to headings in table of contents
This commit is contained in:
parent
e41a02893f
commit
ff0514a7dc
@ -270,10 +270,11 @@ export default class TocWidget extends RightPanelWidget {
|
||||
// intervening events, do the readonly calculation at navigation
|
||||
// time and not at outline creation time
|
||||
// See https://github.com/zadam/trilium/issues/2828
|
||||
const isDocNote = this.note.type === "doc";
|
||||
const isReadOnly = await this.noteContext.isReadOnly();
|
||||
|
||||
let $container;
|
||||
if (isReadOnly) {
|
||||
if (isReadOnly || isDocNote) {
|
||||
$container = await this.noteContext.getContentElement();
|
||||
} else {
|
||||
const textEditor = await this.noteContext.getTextEditor();
|
||||
|
Loading…
x
Reference in New Issue
Block a user