Mermaid

Filters ::: filter_mermaid
Maintained by Lukas Otero--Meledo
Plugin filter to create Mermaid diagrams from text ([Mermaid](http://mermaid.js.org/) format).

Mermaid v0.2.9

Moodle 3.9, 3.10, 3.11, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5
Released: Tuesday, 8 April 2025, 4:32 AM

Plugin Filter Mermaid

Plugin filter to create Mermaid diagrams from text (Mermaid format).

It uses Mermaid tool made by Knut Sveidqvist. Complete syntax is available at http://mermaid.js.org/.

This plugin is distributed under GNU GPL v3 license.

Use:

Add Mermaid format text between [mermaid]...[/mermaid]

Example:

[mermaid]
sequenceDiagram
    Alice ->> Bob: Hello Bob, how are you?
    Bob-->>John: How about you John?
    Bob--x Alice: I am good thanks!
    Bob-x John: I am good thanks!
    Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.

    Bob-->Alice: Checking with John...
    Alice->John: Yes... John, how are you?
[/mermaid]
sequenceDiagram
    Alice ->> Bob: Hello Bob, how are you?
    Bob-->>John: How about you John?
    Bob--x Alice: I am good thanks!
    Bob-x John: I am good thanks!
    Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.

    Bob-->Alice: Checking with John...
    Alice->John: Yes... John, how are you?
[mermaid]
pie title What Voldemort doesn't have?
         "FRIENDS" : 2
         "FAMILY" : 3
         "NOSE" : 45
[/mermaid]
pie title What Voldemort doesn't have?
         "FRIENDS" : 2
         "FAMILY" : 3
         "NOSE" : 45

Attribution:

Thanks to Erwan Gallenne and his DBconcept filter for the inspiration.

Version information

Version build number
2025040701
Version release name
v0.2.9
Maturity
Beta
MD5 Sum
e73ec15155ab66dc70066bfd1dc27dbb
Supported software
Moodle 3.9, Moodle 3.10, Moodle 3.11, Moodle 4.0, Moodle 4.1, Moodle 4.2, Moodle 4.3, Moodle 4.4, Moodle 4.5
  • Latest release for Moodle 3.9
  • Latest release for Moodle 3.10
  • Latest release for Moodle 3.11
  • Latest release for Moodle 4.0
  • Latest release for Moodle 4.1
  • Latest release for Moodle 4.2
  • Latest release for Moodle 4.3
  • Latest release for Moodle 4.4
  • Latest release for Moodle 4.5

Version control information

Version control system (VCS)
GIT
VCS repository URL

Default installation instructions for plugins of the type Filters

  1. Make sure you have all the required versions.
  2. Download and unpack the filter plugin.
  3. Place the folder (eg "myfilter") in the "filter" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation