Mermaid Block Diagram does not display
Describe the bug Mermaid diagrams such as flowchart and graph work - but the block diagram doesn't To Reproduce
- Insert Mermaid diagram into text
- Enter a simple block diagram block columns 3 A["Hallo"] space B["Welt"] A-->B Expected behavior The diagram consisting of two blocks and an arrow in between displays
Screenshots empty gray area "Invalid mermaid source UnknownDiagramError: No diagram type detected matching given configuration for text: block"
Server details:
- Nextcloud version: [e.g. 31.0.1]
- The issue occurs in the Nextcloud demo server as well
Client details:
- OS: Ubuntu 22/4
- Browser: Firefox and Chrome browser
Logs
Browser log
Invalid mermaid source UnknownDiagramError: No diagram type detected matching given configuration for text:
ar chunk-YTJNT7DU.mjs:88
as chunk-YTJNT7DU.mjs:103
fromText mermaid.core.mjs:702
Ig mermaid.core.mjs:1090
Og mermaid.core.mjs:863
n mermaid.core.mjs:1273
n mermaid.core.mjs:1272
Ng mermaid.core.mjs:1262
hT mermaid.core.mjs:1287
hT mermaid.core.mjs:1271
renderMermaid CodeBlockView.vue:208
g index.js:24
c index.js:37
setTimeout handler*R index.js:58
handler CodeBlockView.vue:170
VueJS 7
oh index.js:216
mount index.js:286
qE index.js:5109
CF index.js:253
xn index.js:413
l index.js:1350
create index.js:1281
addNode index.js:1930
updateChildren index.js:1385
gC index.js:2046
updateChildren index.js:1364
updateInner index.js:1460
update index.js:1452
updateStateInner index.js:5401
updateState index.js:5352
dispatchTransaction index.js:4705
dispatch index.js:5719
Ds index.js:702
Ds index.js:661
handleKeyDown index.js:788
keydown index.js:3155
someProp index.js:5508
keydown index.js:3155
n index.js:3077
EditorOutline-CKm1KV5O.chunk.mjs:128:18747
Uncaught (in promise) TypeError: this.supportPreview is not a function
defaultMode CodeBlockView.vue:160
VueJS 3
renderMermaid CodeBlockView.vue:198
g index.js:24
c index.js:37
setTimeout handler*R index.js:58
handler CodeBlockView.vue:170
VueJS 7
oh index.js:216
mount index.js:286
qE index.js:5109
CF index.js:253
xn index.js:413
l index.js:1350
create index.js:1281
addNode index.js:1930
updateChildren index.js:1385
gC index.js:2046
updateChildren index.js:1364
updateInner index.js:1460
update index.js:1452
updateStateInner index.js:5401
updateState index.js:5352
dispatchTransaction index.js:4705
dispatch index.js:5719
get commands/</< index.js:66
updateContent MarkdownContentEditor.vue:158
content MarkdownContentEditor.vue:99
VueJS 12
setContent editor.js:87
updateEditorContent editorMixin.js:165
c index.js:24
d index.js:37
setTimeout handler*u index.js:58
onUpdate editorMixin.js:154
onUpdate editor.js:55
VueJS 2
emit Editor.vue:790
onUpdate Editor.vue:629
emit index.js:159
emit index.js:159
dispatchTransaction index.js:4735
dispatch index.js:5719
Ds index.js:702
Ds index.js:661
handleKeyDown index.js:788
keydown index.js:3155
someProp index.js:5508
keydown index.js:3155
n index.js:3077
EditorOutline-CKm1KV5O.chunk.mjs:128:17646
Invalid mermaid source UnknownDiagramError: No diagram type detected matching given configuration for text: block
columns 3
A["Hallo"]
space
B["Welt"]
A-->B
ar chunk-YTJNT7DU.mjs:88
as chunk-YTJNT7DU.mjs:103
fromText mermaid.core.mjs:702
Ig mermaid.core.mjs:1090
Og mermaid.core.mjs:863
n mermaid.core.mjs:1273
n mermaid.core.mjs:1272
Ng mermaid.core.mjs:1262
hT mermaid.core.mjs:1287
hT mermaid.core.mjs:1271
renderMermaid CodeBlockView.vue:208
g index.js:24
c index.js:37
setTimeout handler*R index.js:58
handler CodeBlockView.vue:170
VueJS 11
updateProps index.js:234
updateProps index.js:233
o index.js:342
update index.js:370
update index.js:1578
updateNextNode index.js:1887
updateChildren index.js:1382
gC index.js:2046
updateChildren index.js:1364
updateInner index.js:1460
update index.js:1452
updateStateInner index.js:5401
updateState index.js:5352
dispatchTransaction index.js:4705
dispatch index.js:5719
Oo index.js:3646
paste index.js:3666
n index.js:3077
EditorOutline-CKm1KV5O.chunk.mjs:128:18747
Invalid mermaid source UnknownDiagramError: No diagram type detected matching given configuration for text: block
columns 3
A["Hallo"]
space
B["Welt"]
A-->B
ar chunk-YTJNT7DU.mjs:88
as chunk-YTJNT7DU.mjs:103
fromText mermaid.core.mjs:702
Ig mermaid.core.mjs:1090
Og mermaid.core.mjs:863
n mermaid.core.mjs:1273
n mermaid.core.mjs:1272
Ng mermaid.core.mjs:1262
hT mermaid.core.mjs:1287
hT mermaid.core.mjs:1271
renderMermaid CodeBlockView.vue:208
g index.js:24
c index.js:37
setTimeout handler*R index.js:58
handler CodeBlockView.vue:170
VueJS 12
setContent editor.js:87
updateEditorContent editorMixin.js:165
c index.js:24
d index.js:37
setTimeout handler*u index.js:58
onUpdate editorMixin.js:154
onUpdate editor.js:55
VueJS 2
emit Editor.vue:790
onUpdate Editor.vue:629
emit index.js:159
emit index.js:159
dispatchTransaction index.js:4735
dispatch index.js:5719
Oo index.js:3646
paste index.js:3666
n index.js:3077
EditorOutline-CKm1KV5O.chunk.mjs:128:18747
@beccon4 thanks for your report. So far I didn't manage to reproduce this. I tested both on Nextcloud 31.0.9 and latest development branches.
Which Nextcloud version are you on when running into this bug? Best way it's already fixed in a newer release.
Also, can you describe exactly how you run into this bug? I did the following:
- Create new markdown text file
- In the editor, create a code block via toolbar
- In the code block three-dot menu, enter mermaid as language
- In the code block, paste your example block diagram code
- In the three-dot menu, select "both"
I'll close this issue due to lack of information. Please comment with the requested details if you still encounter the problem.