Closed haraldschilly closed 2 months ago
Note -- i am NOT going to implement the "only show editor" on focus request unless mermaid is suddenly really popular when used this way, since that is a hellish nightmare... due to the subtle issues of focused between codemirror and slate.
This commit https://github.com/sagemathinc/cocalc/commit/a61ed506f0847ce6d677c2cd6b8d87fdf600ae8e also fixes an subtle issue I noticed with multiple mermaid diagrams in the same document. I also created a new standalone react component Mermaid for rendering mermaid diagrams. Interestingly, I think it's much better than any of the existing mermaid react components I found on github !? It could be published as a little open source library if anybody had time.
To reproduce: create a file
mermaid.md
and then add