mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-28 18:42:28 +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
|
// intervening events, do the readonly calculation at navigation
|
||||||
// time and not at outline creation time
|
// time and not at outline creation time
|
||||||
// See https://github.com/zadam/trilium/issues/2828
|
// See https://github.com/zadam/trilium/issues/2828
|
||||||
|
const isDocNote = this.note.type === "doc";
|
||||||
const isReadOnly = await this.noteContext.isReadOnly();
|
const isReadOnly = await this.noteContext.isReadOnly();
|
||||||
|
|
||||||
let $container;
|
let $container;
|
||||||
if (isReadOnly) {
|
if (isReadOnly || isDocNote) {
|
||||||
$container = await this.noteContext.getContentElement();
|
$container = await this.noteContext.getContentElement();
|
||||||
} else {
|
} else {
|
||||||
const textEditor = await this.noteContext.getTextEditor();
|
const textEditor = await this.noteContext.getTextEditor();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user