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
feat(image-captions): make footnotes work in image captions
Jakob Schlanstedtf10548a05c02
diff --git a/src/insert-footnote-command.js b/src/insert-footnote-command.jsindex 9aa0b0b3b0..30ffeb7bee 100644--- a/src/insert-footnote-command.js+++ b/src/insert-footnote-command.js@@ -63,7 +63,7 @@ export default class InsertFootnoteCommand extends Command {refresh() {const model = this.editor.model;const lastPosition = model.document.selection.getLastPosition();- const allowedIn = lastPosition && model.schema.findAllowedParent(lastPosition, ELEMENTS.footnoteSection);+ const allowedIn = lastPosition && model.schema.findAllowedParent(lastPosition, ELEMENTS.footnoteReference);this.isEnabled = allowedIn !== null;}/**@@ -79,4 +79,4 @@ export default class InsertFootnoteCommand extends Command {return newFootnoteSection;}}-//# sourceMappingURL=insert-footnote-command.js.map\ No newline at end of file+//# sourceMappingURL=insert-footnote-command.js.mapdiff --git a/src/insert-footnote-command.ts b/src/insert-footnote-command.tsindex bb025815f8..e7dde06828 100644--- a/src/insert-footnote-command.ts+++ b/src/insert-footnote-command.ts@@ -76,7 +76,7 @@ export default class InsertFootnoteCommand extends Command {public override refresh(): void {const model = this.editor.model;const lastPosition = model.document.selection.getLastPosition();- const allowedIn = lastPosition && model.schema.findAllowedParent( lastPosition, ELEMENTS.footnoteSection );+ const allowedIn = lastPosition && model.schema.findAllowedParent( lastPosition, ELEMENTS.footnoteReference );this.isEnabled = allowedIn !== null;}