chore(ckeditor5-math): fix references: DowncastWriter -> ViewDowncastWriter

This commit is contained in:
Elian Doran 2025-07-12 19:28:28 +03:00
parent 29d96381fa
commit be33f68c52
No known key found for this signature in database

View File

@ -1,5 +1,5 @@
import MathCommand from './mathcommand.js'; import MathCommand from './mathcommand.js';
import { type Editor, Plugin, toWidget, Widget, viewToModelPositionOutsideModelElement, type DowncastWriter, type ModelElement, CKEditorError, uid } from 'ckeditor5'; import { type Editor, Plugin, toWidget, Widget, viewToModelPositionOutsideModelElement, type ViewDowncastWriter, 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 {
@ -212,7 +212,7 @@ export default class MathEditing extends Plugin {
// Create view for editor // Create view for editor
function createMathtexEditingView( function createMathtexEditingView(
modelItem: ModelElement, modelItem: ModelElement,
writer: DowncastWriter writer: ViewDowncastWriter
) { ) {
const equation = String( modelItem.getAttribute( 'equation' ) ); const equation = String( modelItem.getAttribute( 'equation' ) );
const display = !!modelItem.getAttribute( 'display' ); const display = !!modelItem.getAttribute( 'display' );
@ -262,7 +262,7 @@ export default class MathEditing extends Plugin {
// Create view for data // Create view for data
function createMathtexView( function createMathtexView(
modelItem: ModelElement, modelItem: ModelElement,
{ writer }: { writer: DowncastWriter } { writer }: { writer: ViewDowncastWriter }
) { ) {
const equation = modelItem.getAttribute( 'equation' ); const equation = modelItem.getAttribute( 'equation' );
if ( typeof equation != 'string' ) { if ( typeof equation != 'string' ) {