Insert a Mermaid diagram in Confluence

To insert a Mermaid diagram in Confluence with Capable Diagrams, edit the page, type /diagram, choose Diagram (Capable) and pick Mermaid. Write or paste your Mermaid source and the preview redraws as you type. Select Save and publish the page, and the diagram renders for everyone who can read it.


#Before you start

  • Capable Diagrams is installed on your site and you can edit the page.

  • Mermaid has not been turned off by your administrator. If it is missing from the picker, see Turn diagram languages on or off.


#Steps

  1. Edit the page and put the cursor where the diagram should go.

  2. Type /diagram and choose Diagram (Capable).

  3. In the library picker, choose Mermaid. It is under Software and architecture.

  4. Replace the starter diagram with your own Mermaid source. The preview redraws as you type.

  5. Give the diagram a title in the title field above the editor.

  6. Select Save, then publish the page.


#If it does not work

  • A blank diagram or an error usually means a syntax problem. Mermaid is sensitive to indentation and to the first line, such as flowchart TD or sequenceDiagram. See Diagram does not render.

  • Save stays greyed out until the diagram has a title and some source.

  • If /diagram shows nothing, the app may not be available in this space. See Troubleshooting.



A few lines of text, and the diagram draws itself.