mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	chore(ckeditor5-math): fix references: Element -> ModelElement
This commit is contained in:
		| @@ -1,5 +1,5 @@ | |||||||
| import MathCommand from './mathcommand.js'; | import MathCommand from './mathcommand.js'; | ||||||
| import { type Editor, Plugin, toWidget, Widget, viewToModelPositionOutsideModelElement, type DowncastWriter, type Element, CKEditorError, uid } from 'ckeditor5'; | import { type Editor, Plugin, toWidget, Widget, viewToModelPositionOutsideModelElement, type DowncastWriter, type ModelElement, CKEditorError, uid } from 'ckeditor5'; | ||||||
| import { renderEquation, extractDelimiters } from './utils.js'; | import { renderEquation, extractDelimiters } from './utils.js'; | ||||||
|  |  | ||||||
| export default class MathEditing extends Plugin { | export default class MathEditing extends Plugin { | ||||||
| @@ -211,7 +211,7 @@ export default class MathEditing extends Plugin { | |||||||
|  |  | ||||||
| 		// Create view for editor | 		// Create view for editor | ||||||
| 		function createMathtexEditingView( | 		function createMathtexEditingView( | ||||||
| 			modelItem: Element, | 			modelItem: ModelElement, | ||||||
| 			writer: DowncastWriter | 			writer: DowncastWriter | ||||||
| 		) { | 		) { | ||||||
| 			const equation = String( modelItem.getAttribute( 'equation' ) ); | 			const equation = String( modelItem.getAttribute( 'equation' ) ); | ||||||
| @@ -261,7 +261,7 @@ export default class MathEditing extends Plugin { | |||||||
|  |  | ||||||
| 		// Create view for data | 		// Create view for data | ||||||
| 		function createMathtexView( | 		function createMathtexView( | ||||||
| 			modelItem: Element, | 			modelItem: ModelElement, | ||||||
| 			{ writer }: { writer: DowncastWriter } | 			{ writer }: { writer: DowncastWriter } | ||||||
| 		) { | 		) { | ||||||
| 			const equation = modelItem.getAttribute( 'equation' ); | 			const equation = modelItem.getAttribute( 'equation' ); | ||||||
|   | |||||||
| @@ -1,10 +1,10 @@ | |||||||
| import type { Editor, Element as CKElement, DocumentSelection, PositioningFunction } from 'ckeditor5'; | import type { Editor, ModelElement, DocumentSelection, PositioningFunction } from 'ckeditor5'; | ||||||
| import { BalloonPanelView, CKEditorError } from 'ckeditor5'; | import { BalloonPanelView, CKEditorError } from 'ckeditor5'; | ||||||
| import type { KatexOptions, MathJax2, MathJax3 } from './typings-external.js'; | import type { KatexOptions, MathJax2, MathJax3 } from './typings-external.js'; | ||||||
|  |  | ||||||
| export function getSelectedMathModelWidget( | export function getSelectedMathModelWidget( | ||||||
| 	selection: DocumentSelection | 	selection: DocumentSelection | ||||||
| ): null | CKElement { | ): null | ModelElement { | ||||||
| 	const selectedElement = selection.getSelectedElement(); | 	const selectedElement = selection.getSelectedElement(); | ||||||
|  |  | ||||||
| 	if ( | 	if ( | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user