Details
Has anyone ever tried to do Phorge and Mermaid integration?
I am thinking that could greatly enhance editing experience, blog posts etc.
What do you think?
Example on GitLab:
- https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/15107 - merged in October 2017
Example usage on GitHub:
- https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/ - apparently appeared only since 2022
Project repository:
Answers
A long time ago, we actually had graphviz (https://graphviz.org/) support - it was removed for security concerns: it required running graphviz on the server, using user-provided input.
Remarkup is generated server-side, rather then client-side (like Markdown), so the setup is a little different; But it should be possible for a Remarkup rule to provide javascript based customization such as Mermaid.
I don't remember any attempt to actually insert JS-based Remarkup rule, but it should be possible.
@tanasi have a look at the R5 Diagrams Extension. It integrates draw.io and draw.io can render Mermaid syntax out of the box. So you can use it NOW.