mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
fix(ck-mermaid): lazy loading if mermaid is not loaded
This commit is contained in:
22
libraries/ckeditor/ckeditor.js
vendored
22
libraries/ckeditor/ckeditor.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -175,7 +175,8 @@ const editorConfig = {
|
||||
'AutoformatMath',
|
||||
'indentBlockShortcutPlugin',
|
||||
'removeFormatLinksPlugin',
|
||||
'Footnotes'
|
||||
'Footnotes',
|
||||
'Mermaid'
|
||||
],
|
||||
toolbar: {
|
||||
items: []
|
||||
|
||||
@@ -257,6 +257,9 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
|
||||
lazyLoad: async () => await libraryLoader.requireLibrary(libraryLoader.KATEX),
|
||||
forceOutputType: false, // forces output to use outputType
|
||||
enablePreview: true // Enable preview view
|
||||
},
|
||||
mermaid: {
|
||||
lazyLoad: async () => await libraryLoader.requireLibrary(libraryLoader.MERMAID)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user