mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
chore(ckeditor5): integrate basic plugins
This commit is contained in:
parent
e1af7eba93
commit
8cc8dc2582
@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
];
|
||||
}
|
@ -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,
|
||||
];
|
||||
}
|
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user