Eriksen Labs Support
Documentation

The PlantUML editor

v2.10.03 min readUpdated

The editor you write a PlantUML diagram in: what each part does, how to bring in PlantUML you already have, and how to undo a change.

On this page
  1. The editor, part by part
  2. Paste PlantUML you already have
  3. Undo a mistake

The editor, part by part

  • Examples and More…: a working diagram of each of the 22 kinds the app has an example for.
  • Colours: Auto (match Confluence), Light or Dark. See Colours and dark mode.
  • Draft with AI: describe the diagram in words, and the app copies a ready-made prompt for the AI chat you already use. Paste the chat's answer into Diagram source. The app itself never contacts an AI.
  • Diagram source: the text of the diagram. Words PlantUML knows are colored, to make the text easier to read.
  • Preview: the diagram as it will look, redrawn as you type.
  • Size on the page, under the preview: Readable (automatic) suits most diagrams. It never enlarges a small diagram. A wide one is shrunk to fit, but to three quarters of its size at most, because PlantUML's text is already small; a wider one scrolls sideways. Fill the width stretches or shrinks it to the page width. Actual size shows it exactly as PlantUML draws it.
  • Syntax reference, under the editor: the lines for the kind of diagram you are writing, each with what it does. It follows your text: write a Gantt chart, and it shows Gantt lines. All of them are also on the reference page.
  • Save, Revert changes and Cancel, at the foot. See Undo a mistake.

The PlantUML editor has no Look or Layout settings. Those belong to Mermaid. PlantUML lays out every diagram by itself.

Paste PlantUML you already have

PlantUML is plain text, so you can paste your PlantUML text from a file, a wiki page or an AI chat into Diagram source. The editor takes off the wrapping that often comes with it as you paste: the line of three backticks, such as ```plantuml, that many sites and chats put above and below a diagram; the sentences an AI chat writes around it; and symbols that a web page wrote as codes, such as -> for ->.

The app does not move diagrams from other PlantUML apps by itself. Copy each diagram from where it is now and paste it in. Three libraries ship with the app: C4, ArchiMate and the Kubernetes sprites, written as !include <C4/C4_Container> and so on (see Libraries). A diagram that includes another library, or a file or picture from a web address or a folder, is not drawn, because the app draws each diagram from its own text alone. The editor says what is missing, so you can copy that part into the diagram or leave it out. A C4 diagram that includes C4 from a web address gets a message that gives the line to write instead.

Undo a mistake

  • While you type, Ctrl+Z (Cmd+Z on a Mac) undoes your last change.
  • Revert changes puts the text back the way it was when you opened the editor.
  • Restore a previous version… lists up to five earlier versions of the text, each with its age and its first line after @startuml. Choosing one loads it into the editor. The page does not change until you select Save.
  • Cancel closes the editor without saving. On a diagram you have just inserted, it also removes the diagram.

For the whole page, use Confluence's Version history, under More actions (•••).