From de91326c12193a0ea9d961c08db000b0e36ca70a Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 12 Jul 2025 19:26:52 +0300 Subject: [PATCH] chore(ckeditor5-math): fix references: Element -> ModelElement --- packages/ckeditor5-math/src/mathediting.ts | 6 +++--- packages/ckeditor5-math/src/utils.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/ckeditor5-math/src/mathediting.ts b/packages/ckeditor5-math/src/mathediting.ts index 0c51653c3..465aac2e7 100644 --- a/packages/ckeditor5-math/src/mathediting.ts +++ b/packages/ckeditor5-math/src/mathediting.ts @@ -1,5 +1,5 @@ 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'; export default class MathEditing extends Plugin { @@ -211,7 +211,7 @@ export default class MathEditing extends Plugin { // Create view for editor function createMathtexEditingView( - modelItem: Element, + modelItem: ModelElement, writer: DowncastWriter ) { const equation = String( modelItem.getAttribute( 'equation' ) ); @@ -261,7 +261,7 @@ export default class MathEditing extends Plugin { // Create view for data function createMathtexView( - modelItem: Element, + modelItem: ModelElement, { writer }: { writer: DowncastWriter } ) { const equation = modelItem.getAttribute( 'equation' ); diff --git a/packages/ckeditor5-math/src/utils.ts b/packages/ckeditor5-math/src/utils.ts index 2e120b6c2..893bb58de 100644 --- a/packages/ckeditor5-math/src/utils.ts +++ b/packages/ckeditor5-math/src/utils.ts @@ -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 type { KatexOptions, MathJax2, MathJax3 } from './typings-external.js'; export function getSelectedMathModelWidget( selection: DocumentSelection -): null | CKElement { +): null | ModelElement { const selectedElement = selection.getSelectedElement(); if (