chore(ckeditor5): integrate basic plugins

This commit is contained in:
Elian Doran 2025-05-03 12:59:35 +03:00
parent e1af7eba93
commit 8cc8dc2582
No known key found for this signature in database
5 changed files with 5 additions and 37 deletions

View File

@ -18,7 +18,7 @@ import { buildSelectedBackgroundColor } from "../../components/touch_bar.js";
import { buildConfig, buildToolbarConfig } from "./ckeditor/config.js";
import type FNote from "../../entities/fnote.js";
import { getMermaidConfig } from "../../services/mermaid.js";
import { BalloonEditor, DecoupledEditor, EditorWatchdog } from "@triliumnext/ckeditor5";
import { BalloonEditor, COMMON_PLUGINS, DecoupledEditor, EditorWatchdog } from "@triliumnext/ckeditor5";
const ENABLE_INSPECTOR = false;
@ -317,7 +317,8 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
mermaid: {
lazyLoad: async () => (await import("mermaid")).default, // FIXME
config: getMermaidConfig()
}
},
plugins: COMMON_PLUGINS
});
}

View File

@ -1,17 +0,0 @@
/**
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
// The editor creator to use.
import { BalloonEditor as BalloonEditorBase } from "ckeditor5";
import { BlockToolbar } from "ckeditor5";
import './theme/theme.css';
import { COMMON_PLUGINS } from './config.js';
export default class BalloonEditor extends BalloonEditorBase {
public static override builtinPlugins = [
...COMMON_PLUGINS,
BlockToolbar
];
}

View File

@ -1,15 +0,0 @@
/**
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
// The editor creator to use.
import { DecoupledEditor as DecoupledEditorBase } from "ckeditor5";
import './theme/theme.css';
import { COMMON_PLUGINS } from './config.js';
export default class DecoupledEditor extends DecoupledEditorBase {
public static override builtinPlugins = [
...COMMON_PLUGINS,
];
}

View File

@ -1,3 +1,2 @@
export { EditorWatchdog } from "ckeditor5";
export { default as BalloonEditor } from "./ckeditor_balloon.js";
export { default as DecoupledEditor } from "./ckeditor_decoupled.js";
export { EditorWatchdog, BalloonEditor, DecoupledEditor } from "ckeditor5";
export * from "./plugins.js";