The Mermaid codes seems to break when used within the Visual Editor. However, usage of the Mermaid syntax sort of implies some proficiency with declarative syntaxes and most users will probably be familiar with Wikicode. That being said, being able to add, move, copy and edit diagrams from within the Visual Editor has its advantages.
Here is what we have done on our wiki to get it all to work:
Using a template to wrap the Mermaid parser functions was required because from what I gather, the Visual Editor treats parser functions like templates which conflicts with the Mermaid syntax. For proper integration of the raw #mermaid parser function, a specific Visual Editor tool that lets a user edit it as basic text would be needed.
I figured I'd share our implementation here in case someone wants to reuse some of the code and bring native Visual Editor support to this extension.
The Mermaid codes seems to break when used within the Visual Editor. However, usage of the Mermaid syntax sort of implies some proficiency with declarative syntaxes and most users will probably be familiar with Wikicode. That being said, being able to add, move, copy and edit diagrams from within the Visual Editor has its advantages.
Here is what we have done on our wiki to get it all to work:
Using a template to wrap the Mermaid parser functions was required because from what I gather, the Visual Editor treats parser functions like templates which conflicts with the Mermaid syntax. For proper integration of the raw
#mermaid
parser function, a specific Visual Editor tool that lets a user edit it as basic text would be needed.I figured I'd share our implementation here in case someone wants to reuse some of the code and bring native Visual Editor support to this extension.