Eriksen Labs Support
Documentation

Get started in 5 minutes

v2.10.03 min readUpdated

Mermaid & PlantUML Diagrams for Confluence adds a Mermaid Diagram to Confluence's editor. You type a few lines of text. The app draws the diagram and keeps it on the page.

Mermaid is a widely used way of writing diagrams as text; GitHub and GitLab use it too. The app is called Mermaid & PlantUML Diagrams. What it adds to Confluence's menus is called Mermaid Diagram.

If Mermaid Diagram is not in the list in step 2, the app is not installed on your site. Ask a Confluence admin to add it (see For Confluence admins).

  1. Open the page and select Edit at the top. Or create a new page.
  2. On an empty line, type /mermaid and select Mermaid Diagram. You can also select + (Insert elements) in the toolbar, type Mermaid in its search box and select it there.
    Typing /mermaid on an empty line lists Mermaid Diagram: Render Mermaid diagrams (flowchart, sequence, ERD, Gantt, state, class, and more) directly in Confluence.
    Mermaid Diagram is the first item in the list.
  3. The diagram editor opens by itself. Under Examples, select the one closest to what you want: Flowchart for a process, Gantt for a project plan, Mind map for ideas. Eight are buttons: Flowchart, Sequence, ERD, Gantt, Class, State, Pie and Mind map. More…, beside them, lists 24 other kinds, such as Timeline, User journey and Kanban.
    The diagram editor for a new diagram: eight example buttons and the More… list, then Colours set to Auto (match Confluence), Look set to Classic and Layout set to Standard, the closed Draft with AI row, an empty diagram source with Pick an example to get started, Size on the page under the empty preview, the syntax reference open, and Save, Revert changes and Cancel at the foot of the editor.
    A new diagram. The examples are along the top, with More… at their end, and the Syntax reference is open underneath.
  4. Change the words in Diagram source. In a flowchart, replace the words in brackets. For example, change [Ship it] to [Send to customer]. In a Gantt chart, change the task names before the colons. In a mind map, change the words on each line. The Preview redraws as you type, and the line under the text says "Diagram is valid."
    The Flowchart example after one label was changed to Send to customer: the text on the left, the redrawn preview on the right, Diagram is valid under the text, and Save, Revert changes and Cancel at the foot of the editor.
    One label changed. The preview on the right has already caught up.
  5. Optional: in Alt text for screen readers, describe the diagram in one sentence.
  6. Optional: under the preview, Size on the page sets how big the diagram is drawn. Readable (automatic) suits most diagrams. Fill the width stretches or shrinks it to the page width, as before version 2.8. Actual size shows it exactly as Mermaid draws it.
  7. Select Save, at the foot of the editor. It stays in view, even with the Syntax reference open. The editor closes, and the diagram is on the page.
  8. Select Update at the top of the page to publish your change. On a new page, use the button in the same place.

If you pick another example when you already have text, the editor asks first: "Replace your diagram with the Gantt example?" Replace swaps it in, and Keep mine leaves your text alone. On a new diagram, the Syntax reference under the editor opens by itself.

Would you rather describe the diagram in words? Open Draft with AI above the diagram source. See Draft with AI.

Readers hover over the diagram to zoom, go full screen, copy it or download it. See Zoom, copy and download.

Change a diagram later

  1. Edit the page.
  2. Select the diagram. Clicking inside it does not select it, and the toolbar that appears when you point at it (zoom, Copy and so on) has no Edit. Instead, point at the diagram's edge. When a gray frame and the label Mermaid Diagram appear, select the label. Or click at the end of the line above the diagram and press the down arrow key.
  3. Select Edit, the pencil in the small toolbar under the diagram.
The diagram selected in the Confluence editor, with the label Mermaid Diagram above it and its small toolbar under it: the Edit pencil, Centered, Copy and Remove.
A selected diagram. Its label, Mermaid Diagram, is above the top left corner. The pencil on the left of the toolbar under it is Edit.

Confluence calls app content like this a macro; you will see the word in some messages.