Jump to content

Extension:SimpleMermaid

From mediawiki.org
MediaWiki extensions manual
SimpleMermaid
Release status: stable
Implementation Tag
Description Renders Mermaid diagrams in MediaWiki using the ‎<mermaid> tag
Author(s) jmnote
Latest version 0.1.2 (2026-03-15)
MediaWiki 1.39+
Database changes No
‎<mermaid>
Licence Apache License 2.0
Download
README
Example zetawiki.com

The SimpleMermaid extension renders diagrams with the Mermaid JavaScript library directly in MediaWiki pages.

It adds a ‎<mermaid>...‎</mermaid> tag for embedding Mermaid diagram source in wiki pages.

This extension loads Mermaid from a CDN at runtime, so client browsers must be able to access the external Mermaid bundle.

Features

[edit]
  • Renders Mermaid diagrams from the ‎<mermaid> tag
  • Supports align="left|center|right"
  • Provides Copy and Fullscreen buttons
  • In fullscreen mode, supports zoom, pan, and reset
  • Follows MediaWiki dark mode styling

Installation

[edit]
  • Download and place the file(s) in a directory called SimpleMermaid in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'SimpleMermaid' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage

[edit]
<mermaid>
flowchart TD
    A[Start] --> B{Decision}
    B -->|Yes| C[Do something]
    B -->|No| D[Do something else]
</mermaid>

Optional alignment:

<mermaid align="center">
graph LR
    A --> B
</mermaid>

See also

[edit]
[edit]