Macro plantuml


Create UML and other diagrams with PlantUML.


All parameters are optional.


Type of the diagram. Supported values are:

  • plantuml (default)
  • ditaa
  • dot
  • jcckit
  • salt

Align the diagram. Supported values are:

  • none (default)
  • left
  • center
  • right
 borderBorder size in pixel. Value must be integer > 0.
 hspaceExtra space left and right from the image. Value must be integer > 0.
 vspaceExtra space below and above the image. Value must be integer > 0.
 titleTitle of the diagram, default is none title.
(warning) This is only supported by some diagrams of type plantuml.
dropshadowDrop shadow: 'true' (default), 'false'.
This feature is not supported by all diagram types.
separationSeparation of common edges of shapes in DITAA diagrams: 'true' (default), 'false'
preserve white spacesIf checked no empty line nor white spaces from the beginning of the line or end of the line will be removed anymore. Please note that you can change the default behavior in the (global) plugin configuration.

PNG (default)

SVG (beta)


The graph will be stored as attachment if exportName is given.

(warning) The value of the exportName attribute must be unique on page level scope otherwise the attachments were overwritten on every page view!

(warning) Note that if you update the plugin or the underlying graphviz library this may trigger that a user who is viewing a page will write a new version of the diagram as attachment to the page!


true = Enable debugging.

Sample Code

The body of the macro contains the PlantUML block. The @startuml and @enduml tags are not required.

state "In Progress" as InProgress
Open -->  InProgress : Start Progress
Open --> Resolved : Resolve Issue
Open --> Closed : Close Issue
InProgress  -up-> Open : Stop Progress
InProgress  --> Resolved : Resolve Issue
InProgress  --> Closed : Close Issue
Resolved  --> Closed : Close Issue
Resolved  --> Reopened : Reopen Issue
Reopened  --> Resolved : Resolve Issue
Reopened  --> Closed  : Close Issue
Reopened  --> InProgress: Start Progress
Closed -up-> Reopened : Reopen Issue

Include content from attachment or other wiki page

The PlantUML Macro supports the !include directive to include attachments or wiki pages in your diagram. It is not allowed to include files from the filesystem on the server side.

The following link types are supported:

  • ^attachment.ext
  • pagetitle
  • pagetitle^attachment.ext
  • spacekey:pagetitle
  • spacekey:pagetitle^attachment.ext 

In the following example the content of the attachment common.iuml from the current wiki page will be included.

!include ^common.iuml 
Foo <!-- Bar 

URLs in diagrams

This feature is not supported in sequence and ditaa diagrams.

You can link components of a diagram to other Confluence pages or to external URLs (see sample below). The linkage is still beta since this feature is not officially integrated into the PlantUML library! From version 1.4.2 links can also be written using Confluence markup.

Internet --|> Space
Space --|> Page
url for Internet is [[]]
url for Space is [[FOO:Bar]]
url for Page is [Link in Confluence Markup|Home]

The following list contains all different link notations that can be used inside Confluence:

  • [#anchor] 
  • [pagetitle]
  • [pagetitle#anchor]
  • [spacekey:pagetitle]
  • [spacekey:pagetitle#anchor]
  • [phrase@shortcut]

You can always pass a 'alias' that can be used as link text. To separate the URL from the alias use the pipe symbol '|'.

url for Space is [[FOO:Bar|This is the link text]]
url for Space is [This is the link text|FOO:Bar]

Standard links are enclosed by two brackets instead of Confluence links that are enclosed by only one bracket. If the link starts with a slash '/' like /path/to/file.html or the link contains a protocol like than this will not be interpreted as Confluence link and therefore stays untouched.

Embedding Images

It is possible to embed images into a diagram using the creole engine. 

<u>Simple</u> communication example
on <i>several</i> lines and using <font color=red>html</font>
This is a local image on the server <img /home/confluence/confluence-5.9/atlassian-confluence-5.9.6/confluence/images/icons/mail.png>
This is the compact syntax <img:>
end title
A -> B: Request
A <-- B: Response


The default rendering mode for PlantUML diagrams is Svek. The difference between Svek and the old GraphViz rendering mode is illustrated in the following picture:

The 1st diagram left is rendered using the (old) GraphViz mode. The other diagrams are rendered using the (default) Svek rendering mode (w/ and w/o drop-shadow effect and the last one is a SVG image instead of PNG image).

SVG Support

All diagrams are rendered as PNG image by default. You can switch to SVG output format using the "format" macro parameter:

Foo o-- Bar

Macro Browser