# 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](https://help.gocapable.com/diagrams/turn-diagram-languages-on-or-off.html). --- ## 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. 📝 **Without editing the page first:** select **Capable** in the byline under the page title, type `mermaid` in **Search capabilities**, pick **Mermaid** under **Diagram libraries** (or a Mermaid template under **Templates**), write your diagram and select **Insert**. --- ## 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](https://help.gocapable.com/diagrams/diagram-does-not-render.html). * **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](https://help.gocapable.com/diagrams/troubleshooting.html). --- ## Related ### [Mermaid](https://help.gocapable.com/diagrams/mermaid.html) What Mermaid draws, and its syntax. ### [Mermaid examples](https://help.gocapable.com/diagrams/mermaid-examples.html) Working Mermaid you can paste. ### [Mermaid visual editor](https://help.gocapable.com/diagrams/mermaid-visual-editor.html) Click instead of type. ### [Insert a diagram](https://help.gocapable.com/diagrams/insert-a-diagram.html) Every way to put a diagram on a page. --- _A few lines of text, and the diagram draws itself._