Eriksen Labs Support
Documentation

PlantUML in Confluence

v2.10.03 min readUpdated

Put a PlantUML diagram on a Confluence page in a few minutes. You type a few short lines, and the app draws the picture. No coding needed.

On this page
  1. Before you start
  2. Add a PlantUML diagram
  3. Change a diagram later

Before you start

PlantUML is part of Mermaid & PlantUML Diagrams for Confluence, our diagrams app for Confluence Cloud. The app adds three items to Confluence's editor: Mermaid Diagram, PlantUML Diagram and OpenAPI Diagram (since 2.11.0; see OpenAPI in Confluence). They are one app, with one installation and one license.

Confluence calls an item like this a macro. You will see the word in some of Confluence's own messages.

If PlantUML Diagram is not in the list in step 2 below, the app is not installed on your site, or not at version 2.10.0 or later, the version that adds PlantUML. Ask a Confluence admin to add or update it (see For Confluence admins).

Add a PlantUML diagram

  1. Open the page and select Edit at the top. Or create a new page.
  2. On an empty line, type /plantuml and select PlantUML Diagram. Typing /diagram lists the app's items. You can also select + (Insert elements) in the toolbar and search for PlantUML there.
    Typing /plantuml on an empty line lists PlantUML Diagram: Draw PlantUML diagrams (sequence, class, activity, component, state, use case, and more) in the page. Nothing is sent outside Atlassian.
    PlantUML Diagram is the only item in the list.
  3. The diagram editor opens by itself. Under Examples, select the one closest to what you want. Eight are buttons: Sequence, Class, Activity, Component, State, Use case, Gantt and Mind map. More…, beside them, lists 14 other kinds, such as Deployment, C4, Timing, Network and Wireframe.
    The editor for a new PlantUML diagram: eight example buttons (Sequence, Class, Activity, Component, State, Use case, Gantt and Mind map) and the More… list, Colours set to Auto (match Confluence), the closed Draft with AI row, an empty diagram source with Pick an example to get started, an empty preview, the PlantUML syntax reference open, and Save, Revert changes and Cancel at the foot of the editor.
    A new PlantUML diagram. The examples are along the top, with More… at their end.
  4. Change the words in Diagram source. In the Sequence example, change the names and the words after each colon. The Preview redraws as you type, and the line under the text says "Diagram is valid."
    The Sequence example after one message was changed to Place an order: the text on the left, the redrawn preview with User, API and DB on the right, Diagram is valid under the text, alt text filled in, and Save, Revert changes and Cancel at the foot of the editor.
    One message changed. The preview on the right has already caught up.
  5. Optional: in Alt text for screen readers, describe the diagram in one sentence, for people who can't see it.
  6. Select Save, at the foot of the editor. The editor closes, and the diagram is on the page.
  7. 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.

New to PlantUML? The examples are the quickest way in: pick one, change the words, and watch the preview. Learn PlantUML explains each kind, one at a time.

Change a diagram later

  1. Edit the page.
  2. Select the diagram. Clicking inside it does not select it. Instead, point at the diagram's edge. When a gray frame and the label PlantUML 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.
A sequence diagram selected in the Confluence editor, with the label PlantUML Diagram above it and its small toolbar under it: the Edit pencil, Centered, Copy and Remove.
A selected diagram. Its label, PlantUML Diagram, is above the top left corner. The pencil on the left of the toolbar under it is Edit.