...
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.
Code Block | ||
---|---|---|
| ||
{startuml} !include ^common.iuml Foo <!-- Bar {startuml} |
URLs in diagrams
Info |
---|
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.
Code Block | ||
---|---|---|
| ||
{plantuml} Internet --|> Space Space --|> Page url for Internet is [[http://www.jcoderz.org/fawkez]] url for Space is [[FOO:Bar]] url for Page is [Link in Confluence Markup|Home] {plantuml} |
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 '|'.
Code Block | ||
---|---|---|
| ||
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 http://www.jcoderz.org
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.
Code Block |
---|
title
<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:http://www.eclipse.org/tptp/images/ico_home.gif>
end title
A -> B: Request
A <-- B: Response |
Svek
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:
Code Block | ||
---|---|---|
| ||
{plantuml:format=SVG} Foo o-- Bar {plantuml} |