mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-05-03 02:39:53 -05:00
fix(client): reintroduce attribute editor
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import "ckeditor5/ckeditor5.css";
|
||||
import { COMMON_PLUGINS, POPUP_EDITOR_PLUGINS } from "./plugins";
|
||||
import { COMMON_PLUGINS, CORE_PLUGINS, POPUP_EDITOR_PLUGINS } from "./plugins";
|
||||
import { BalloonEditor, DecoupledEditor } from "ckeditor5";
|
||||
export { EditorWatchdog } from "ckeditor5";
|
||||
|
||||
@@ -14,7 +14,7 @@ export type CKTextEditor = ClassicEditor | PopupEditor;
|
||||
*/
|
||||
export class AttributeEditor extends BalloonEditor {
|
||||
static override get builtinPlugins() {
|
||||
return [];
|
||||
return CORE_PLUGINS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,12 +49,17 @@ const EXTERNAL_PLUGINS: typeof Plugin[] = [
|
||||
AutoformatMath
|
||||
];
|
||||
|
||||
export const CORE_PLUGINS: typeof Plugin[] = [
|
||||
Clipboard, Enter, SelectAll,
|
||||
ShiftEnter, Typing, Undo,
|
||||
Paragraph
|
||||
];
|
||||
|
||||
export const COMMON_PLUGINS: typeof Plugin[] = [
|
||||
...CORE_PLUGINS,
|
||||
...TRILIUM_PLUGINS,
|
||||
...EXTERNAL_PLUGINS,
|
||||
|
||||
// essentials package expanded to allow selectively disable Enter and ShiftEnter
|
||||
Clipboard, Enter, SelectAll, ShiftEnter, Typing, Undo,
|
||||
CKFinderUploadAdapter,
|
||||
Autoformat,
|
||||
Bold,
|
||||
@@ -78,7 +83,6 @@ export const COMMON_PLUGINS: typeof Plugin[] = [
|
||||
List,
|
||||
ListProperties,
|
||||
TodoList,
|
||||
Paragraph,
|
||||
PasteFromOffice,
|
||||
PictureEditing,
|
||||
Table,
|
||||
@@ -107,7 +111,7 @@ export const COMMON_PLUGINS: typeof Plugin[] = [
|
||||
PageBreak,
|
||||
GeneralHtmlSupport,
|
||||
TextPartLanguage,
|
||||
Style
|
||||
Style
|
||||
];
|
||||
|
||||
export const POPUP_EDITOR_PLUGINS: typeof Plugin[] = [
|
||||
|
||||
Reference in New Issue
Block a user