mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
chore(ckeditor5-footnotes): fix more errors
This commit is contained in:
parent
face58c7e2
commit
c0a64d1ef0
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user