From c0a64d1ef0d567f41275997706043efdf117301f Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 4 May 2025 21:06:57 +0300 Subject: [PATCH] chore(ckeditor5-footnotes): fix more errors --- packages/ckeditor5-footnotes/src/augmentation.ts | 4 ++++ .../src/footnote-editing/footnote-editing.ts | 5 +++++ packages/ckeditor5-footnotes/src/footnote-ui.ts | 5 +++++ packages/ckeditor5-footnotes/src/utils.ts | 3 +-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/ckeditor5-footnotes/src/augmentation.ts b/packages/ckeditor5-footnotes/src/augmentation.ts index 11db0fbd0..49509a163 100644 --- a/packages/ckeditor5-footnotes/src/augmentation.ts +++ b/packages/ckeditor5-footnotes/src/augmentation.ts @@ -1,7 +1,11 @@ +import FootnoteEditing from './footnote-editing/footnote-editing.js'; +import FootnoteUI from './footnote-ui.js'; import type { Footnotes } from './index.js'; declare module 'ckeditor5' { interface PluginsMap { [ Footnotes.pluginName ]: Footnotes; + [ FootnoteEditing.pluginName ]: FootnoteEditing; + [ FootnoteUI.pluginName ]: FootnoteUI; } } diff --git a/packages/ckeditor5-footnotes/src/footnote-editing/footnote-editing.ts b/packages/ckeditor5-footnotes/src/footnote-editing/footnote-editing.ts index 9d2cc85f6..5fefb6834 100644 --- a/packages/ckeditor5-footnotes/src/footnote-editing/footnote-editing.ts +++ b/packages/ckeditor5-footnotes/src/footnote-editing/footnote-editing.ts @@ -14,6 +14,11 @@ import { modelQueryElement, modelQueryElementsAll } from '../utils.js'; import { Autoformat, Batch, Element, Plugin, RootElement, viewToModelPositionOutsideModelElement, Widget, Writer } from 'ckeditor5'; export default class FootnoteEditing extends Plugin { + + public static get pluginName() { + return 'FootnotesEditing' as const; + } + public static get requires() { return [ Widget, Autoformat ] as const; } diff --git a/packages/ckeditor5-footnotes/src/footnote-ui.ts b/packages/ckeditor5-footnotes/src/footnote-ui.ts index 08dbfde40..c54b77187 100644 --- a/packages/ckeditor5-footnotes/src/footnote-ui.ts +++ b/packages/ckeditor5-footnotes/src/footnote-ui.ts @@ -10,6 +10,11 @@ import insertFootnoteIcon from '../theme/icons/insert-footnote.svg'; import { modelQueryElement, modelQueryElementsAll } from './utils.js'; export default class FootnoteUI extends Plugin { + + public static get pluginName() { + return 'FootnoteUI' as const; + } + public init(): void { const editor = this.editor; const translate = editor.t; diff --git a/packages/ckeditor5-footnotes/src/utils.ts b/packages/ckeditor5-footnotes/src/utils.ts index ede2b24d9..5121b8b5c 100644 --- a/packages/ckeditor5-footnotes/src/utils.ts +++ b/packages/ckeditor5-footnotes/src/utils.ts @@ -1,5 +1,4 @@ -import { type Editor } from 'ckeditor5/src/core.js'; -import { Element, Text, TextProxy, ViewElement } from 'ckeditor5/src/engine.js'; +import { type Editor, Element, Text, TextProxy, ViewElement } from 'ckeditor5'; // There's ample DRY violation in this file; type checking // polymorphism without full typescript is just incredibly finicky.