Skip to content

Build your personal knowledge base with Trilium Notes

chore(ckeditor5-footnotes): fix references: RootElement -> ModelRootElement

Elian Doran6ead31b45f4f
diff --git a/packages/ckeditor5-footnotes/src/footnote-editing/footnote-editing.ts b/packages/ckeditor5-footnotes/src/footnote-editing/footnote-editing.ts
index 5fefb68342..80649e59dd 100644
--- a/packages/ckeditor5-footnotes/src/footnote-editing/footnote-editing.ts
+++ b/packages/ckeditor5-footnotes/src/footnote-editing/footnote-editing.ts
@@ -11,7 +11,7 @@ import { defineSchema } from './schema.js';
import { ATTRIBUTES, COMMANDS, ELEMENTS } from '../constants.js';
import InsertFootnoteCommand from '../insert-footnote-command.js';
import { modelQueryElement, modelQueryElementsAll } from '../utils.js';
-import { Autoformat, Batch, Element, Plugin, RootElement, viewToModelPositionOutsideModelElement, Widget, Writer } from 'ckeditor5';
+import { Autoformat, Batch, Element, Plugin, ModelRootElement, viewToModelPositionOutsideModelElement, Widget, Writer } from 'ckeditor5';
export default class FootnoteEditing extends Plugin {
@@ -26,7 +26,7 @@ export default class FootnoteEditing extends Plugin {
/**
* The root element of the document.
*/
- public get rootElement(): RootElement {
+ public get rootElement(): ModelRootElement {
const rootElement = this.editor.model.document.getRoot();
if ( !rootElement ) {
throw new Error( 'Document has no rootElement element.' );
diff --git a/packages/ckeditor5-footnotes/src/insert-footnote-command.ts b/packages/ckeditor5-footnotes/src/insert-footnote-command.ts
index 30789660c6..850236ad89 100644
--- a/packages/ckeditor5-footnotes/src/insert-footnote-command.ts
+++ b/packages/ckeditor5-footnotes/src/insert-footnote-command.ts
@@ -1,4 +1,4 @@
-import { Command, type Element, type RootElement, type Writer } from "ckeditor5";
+import { Command, type Element, type ModelRootElement, type Writer } from "ckeditor5";
import { ATTRIBUTES, ELEMENTS } from './constants.js';
import { modelQueryElement } from './utils.js';
@@ -82,7 +82,7 @@ export default class InsertFootnoteCommand extends Command {
/**
* Returns the footnote section if it exists, or creates on if it doesn't.
*/
- private _getFootnoteSection( writer: Writer, rootElement: RootElement ): Element {
+ private _getFootnoteSection( writer: Writer, rootElement: ModelRootElement ): Element {
const footnoteSection = modelQueryElement( this.editor, rootElement, element =>
element.is( 'element', ELEMENTS.footnoteSection )
);