fix(ck-mermaid): lazy loading if mermaid is not loaded

This commit is contained in:
Elian Doran 2025-01-07 17:27:34 +02:00
parent 1de6c7d5b2
commit 5d5a490312
No known key found for this signature in database
4 changed files with 7 additions and 23 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -175,7 +175,8 @@ const editorConfig = {
'AutoformatMath', 'AutoformatMath',
'indentBlockShortcutPlugin', 'indentBlockShortcutPlugin',
'removeFormatLinksPlugin', 'removeFormatLinksPlugin',
'Footnotes' 'Footnotes',
'Mermaid'
], ],
toolbar: { toolbar: {
items: [] items: []

View File

@ -257,6 +257,9 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
lazyLoad: async () => await libraryLoader.requireLibrary(libraryLoader.KATEX), lazyLoad: async () => await libraryLoader.requireLibrary(libraryLoader.KATEX),
forceOutputType: false, // forces output to use outputType forceOutputType: false, // forces output to use outputType
enablePreview: true // Enable preview view enablePreview: true // Enable preview view
},
mermaid: {
lazyLoad: async () => await libraryLoader.requireLibrary(libraryLoader.MERMAID)
} }
}); });
} }