mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	feat(image-captions): make footnotes work in image captions
This commit is contained in:
		| @@ -63,7 +63,7 @@ export default class InsertFootnoteCommand extends Command { | |||||||
|     refresh() { |     refresh() { | ||||||
|         const model = this.editor.model; |         const model = this.editor.model; | ||||||
|         const lastPosition = model.document.selection.getLastPosition(); |         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; |         this.isEnabled = allowedIn !== null; | ||||||
|     } |     } | ||||||
|     /** |     /** | ||||||
|   | |||||||
| @@ -76,7 +76,7 @@ export default class InsertFootnoteCommand extends Command { | |||||||
| 	public override refresh(): void { | 	public override refresh(): void { | ||||||
| 		const model = this.editor.model; | 		const model = this.editor.model; | ||||||
| 		const lastPosition = model.document.selection.getLastPosition(); | 		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; | 		this.isEnabled = allowedIn !== null; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user