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';
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user