chore(ckeditor5-footnotes): fix more errors

This commit is contained in:
Elian Doran 2025-05-04 21:06:57 +03:00
parent face58c7e2
commit c0a64d1ef0
No known key found for this signature in database
4 changed files with 15 additions and 2 deletions

View File

@ -1,7 +1,11 @@
import FootnoteEditing from './footnote-editing/footnote-editing.js';
import FootnoteUI from './footnote-ui.js';
import type { Footnotes } from './index.js'; import type { Footnotes } from './index.js';
declare module 'ckeditor5' { declare module 'ckeditor5' {
interface PluginsMap { interface PluginsMap {
[ Footnotes.pluginName ]: Footnotes; [ Footnotes.pluginName ]: Footnotes;
[ FootnoteEditing.pluginName ]: FootnoteEditing;
[ FootnoteUI.pluginName ]: FootnoteUI;
} }
} }

View File

@ -14,6 +14,11 @@ import { modelQueryElement, modelQueryElementsAll } from '../utils.js';
import { Autoformat, Batch, Element, Plugin, RootElement, viewToModelPositionOutsideModelElement, Widget, Writer } from 'ckeditor5'; import { Autoformat, Batch, Element, Plugin, RootElement, viewToModelPositionOutsideModelElement, Widget, Writer } from 'ckeditor5';
export default class FootnoteEditing extends Plugin { export default class FootnoteEditing extends Plugin {
public static get pluginName() {
return 'FootnotesEditing' as const;
}
public static get requires() { public static get requires() {
return [ Widget, Autoformat ] as const; return [ Widget, Autoformat ] as const;
} }

View File

@ -10,6 +10,11 @@ import insertFootnoteIcon from '../theme/icons/insert-footnote.svg';
import { modelQueryElement, modelQueryElementsAll } from './utils.js'; import { modelQueryElement, modelQueryElementsAll } from './utils.js';
export default class FootnoteUI extends Plugin { export default class FootnoteUI extends Plugin {
public static get pluginName() {
return 'FootnoteUI' as const;
}
public init(): void { public init(): void {
const editor = this.editor; const editor = this.editor;
const translate = editor.t; const translate = editor.t;

View File

@ -1,5 +1,4 @@
import { type Editor } from 'ckeditor5/src/core.js'; import { type Editor, Element, Text, TextProxy, ViewElement } from 'ckeditor5';
import { Element, Text, TextProxy, ViewElement } from 'ckeditor5/src/engine.js';
// There's ample DRY violation in this file; type checking // There's ample DRY violation in this file; type checking
// polymorphism without full typescript is just incredibly finicky. // polymorphism without full typescript is just incredibly finicky.