This has been asked before but the thread was closed with 0 replies. Obsidian uses PrismJS for syntax highlighting, and PrismJS supports mermaid syntax, but Obsidian does not style mermaid code in code blocks in editing mode. I create mermaid charts all the time, and it would be nice to do it in Obsidian, but the lack of highlighting makes it difficult to work efficiently with large charts. When will Obsidian update to a more recent version of Prism that supports more languages?
You create a code block with
mermaid as the language. You begin typing up your mermaid markup, and you can see that the diagram gets rendered correctly in the preview pane, but your syntax is all grey and homogeneous, making it difficult to read and edit.
Using the mermaid.live editor and copying the mermaid code into Obsidian. Gross.