mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
fix(client): reintroduce attribute editor
This commit is contained in:
parent
b2ff0739d5
commit
307c322165
@ -131,58 +131,6 @@ const mentionSetup: MentionConfig = {
|
||||
};
|
||||
|
||||
const editorConfig = {
|
||||
...buildConfig(),
|
||||
removePlugins: [
|
||||
"Heading",
|
||||
"Link",
|
||||
"Autoformat",
|
||||
"Bold",
|
||||
"Italic",
|
||||
"Underline",
|
||||
"Strikethrough",
|
||||
"Code",
|
||||
"Superscript",
|
||||
"Subscript",
|
||||
"BlockQuote",
|
||||
"Image",
|
||||
"ImageCaption",
|
||||
"ImageStyle",
|
||||
"ImageToolbar",
|
||||
"ImageUpload",
|
||||
"ImageResize",
|
||||
"List",
|
||||
"TodoList",
|
||||
"PasteFromOffice",
|
||||
"Table",
|
||||
"TableToolbar",
|
||||
"TableProperties",
|
||||
"TableCellProperties",
|
||||
"Indent",
|
||||
"IndentBlock",
|
||||
"BlockToolbar",
|
||||
"ParagraphButtonUI",
|
||||
"HeadingButtonsUI",
|
||||
"UploadimagePlugin",
|
||||
"InternalLinkPlugin",
|
||||
"MarkdownImportPlugin",
|
||||
"CuttonotePlugin",
|
||||
"TextTransformation",
|
||||
"Font",
|
||||
"FontColor",
|
||||
"FontBackgroundColor",
|
||||
"CodeBlock",
|
||||
"SelectAll",
|
||||
"IncludeNote",
|
||||
"CutToNote",
|
||||
"Math",
|
||||
"AutoformatMath",
|
||||
"indentBlockShortcutPlugin",
|
||||
"removeFormatLinksPlugin",
|
||||
"Footnotes",
|
||||
"Mermaid",
|
||||
"Kbd",
|
||||
"Admonition"
|
||||
],
|
||||
toolbar: {
|
||||
items: []
|
||||
},
|
||||
@ -213,7 +161,7 @@ export default class AttributeEditorWidget extends NoteContextAwareWidget implem
|
||||
this.$widget = $(TPL);
|
||||
this.$editor = this.$widget.find(".attribute-list-editor");
|
||||
|
||||
// this.initialized = this.initEditor();
|
||||
this.initialized = this.initEditor();
|
||||
|
||||
this.$editor.on("keydown", async (e) => {
|
||||
if (e.which === 13) {
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user