fix(attributes): reference links not working

This commit is contained in:
Elian Doran 2025-05-15 12:17:59 +03:00
parent ff89ab646c
commit b7d118a12c
No known key found for this signature in database

View File

@ -24,22 +24,26 @@ import "@triliumnext/ckeditor5-admonition/index.css";
import "@triliumnext/ckeditor5-footnotes/index.css";
import "@triliumnext/ckeditor5-math/index.css";
/**
* Plugins that are specific to Trilium and not part of the CKEditor 5 core, included in both text editors but not in the attribute editor.
*/
const TRILIUM_PLUGINS: typeof Plugin[] = [
CutToNotePlugin,
ItalicAsEmPlugin,
StrikethroughAsDel,
ReferenceLink,
UploadimagePlugin,
InternalLinkPlugin,
RemoveFormatLinksPlugin,
IndentBlockShortcutPlugin,
MarkdownImportPlugin,
MentionCustomization,
IncludeNote,
Uploadfileplugin,
SyntaxHighlighting
];
/**
* External plugins that are not part of the CKEditor 5 core and not part of Trilium, included in both text editors but not in the attribute editor.
*/
const EXTERNAL_PLUGINS: typeof Plugin[] = [
Kbd,
Mermaid,
@ -49,13 +53,23 @@ const EXTERNAL_PLUGINS: typeof Plugin[] = [
AutoformatMath
];
/**
* The minimal set of plugins required for the editor to work. This is used both in normal text editors (floating or fixed toolbar) and in the attribute editor.
*/
export const CORE_PLUGINS: typeof Plugin[] = [
Clipboard, Enter, SelectAll,
ShiftEnter, Typing, Undo,
Paragraph,
Mention
Mention,
// Trilium plugins
MentionCustomization,
ReferenceLink
];
/**
* The set of plugins that are required for the editor to work. This is used in normal text editors (floating or fixed toolbar) but not in the attribute editor.
*/
export const COMMON_PLUGINS: typeof Plugin[] = [
...CORE_PLUGINS,
...TRILIUM_PLUGINS,
@ -116,9 +130,10 @@ export const COMMON_PLUGINS: typeof Plugin[] = [
Emoji
];
/**
* The set of plugins specific to the popup editor (floating toolbar mode), and not the fixed toolbar mode.
*/
export const POPUP_EDITOR_PLUGINS: typeof Plugin[] = [
...COMMON_PLUGINS,
BlockToolbar
];
export const COMMON_SETTINGS = { };