Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit b7d118a

Browse files
committed
fix(attributes): reference links not working
1 parent ff89ab6 commit b7d118a

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

packages/ckeditor5/src/plugins.ts

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,26 @@ import "@triliumnext/ckeditor5-admonition/index.css";
2424
import "@triliumnext/ckeditor5-footnotes/index.css";
2525
import "@triliumnext/ckeditor5-math/index.css";
2626

27+
/**
28+
* 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.
29+
*/
2730
const TRILIUM_PLUGINS: typeof Plugin[] = [
2831
CutToNotePlugin,
2932
ItalicAsEmPlugin,
3033
StrikethroughAsDel,
31-
ReferenceLink,
3234
UploadimagePlugin,
3335
InternalLinkPlugin,
3436
RemoveFormatLinksPlugin,
3537
IndentBlockShortcutPlugin,
3638
MarkdownImportPlugin,
37-
MentionCustomization,
3839
IncludeNote,
3940
Uploadfileplugin,
4041
SyntaxHighlighting
4142
];
4243

44+
/**
45+
* 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.
46+
*/
4347
const EXTERNAL_PLUGINS: typeof Plugin[] = [
4448
Kbd,
4549
Mermaid,
@@ -49,13 +53,23 @@ const EXTERNAL_PLUGINS: typeof Plugin[] = [
4953
AutoformatMath
5054
];
5155

56+
/**
57+
* 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.
58+
*/
5259
export const CORE_PLUGINS: typeof Plugin[] = [
5360
Clipboard, Enter, SelectAll,
5461
ShiftEnter, Typing, Undo,
5562
Paragraph,
56-
Mention
63+
Mention,
64+
65+
// Trilium plugins
66+
MentionCustomization,
67+
ReferenceLink
5768
];
5869

70+
/**
71+
* 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.
72+
*/
5973
export const COMMON_PLUGINS: typeof Plugin[] = [
6074
...CORE_PLUGINS,
6175
...TRILIUM_PLUGINS,
@@ -116,9 +130,10 @@ export const COMMON_PLUGINS: typeof Plugin[] = [
116130
Emoji
117131
];
118132

133+
/**
134+
* The set of plugins specific to the popup editor (floating toolbar mode), and not the fixed toolbar mode.
135+
*/
119136
export const POPUP_EDITOR_PLUGINS: typeof Plugin[] = [
120137
...COMMON_PLUGINS,
121138
BlockToolbar
122139
];
123-
124-
export const COMMON_SETTINGS = { };

0 commit comments

Comments
 (0)