Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(in-app-help): jumping to headings in table of contents
Elian Doranff0514a7dc74
diff --git a/src/public/app/widgets/toc.js b/src/public/app/widgets/toc.jsindex 7eeed355cf..ab221edd65 100644--- a/src/public/app/widgets/toc.js+++ b/src/public/app/widgets/toc.js@@ -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();