mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 02:02:29 +08:00
feat(image-captions): make footnotes work in image captions
This commit is contained in:
parent
971be65ba5
commit
f10548a05c
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user