feat(image-captions): make footnotes work in image captions

This commit is contained in:
Jakob Schlanstedt 2025-04-28 16:08:05 +02:00
parent 971be65ba5
commit f10548a05c
2 changed files with 3 additions and 3 deletions

View File

@ -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
//# sourceMappingURL=insert-footnote-command.js.map

View File

@ -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;
}