Creole
Creole is a lightweight common markup language for various wikis. A light-weight Creole engine is integrated in PlantUML to have a standardized way to emit styled text. All diagrams support this syntax. Note that compatibility with HTML syntax is preserved.
Emphasized text
|
🎉 Copied!
|
|
Lists
You can use numbered and bulleted lists in node text, notes, etc.
FIXME
🚩 You cannot quite mix numbers and bullets in a list and its sublist.
|
🎉 Copied!
|
|
Escape character
You can use the tilde ~ to escape special creole characters.
|
🎉 Copied!
|
|
Headings
|
🎉 Copied!
|
|
Emoji
All emojis from Twemoji (see EmojiTwo on Github) are available using the following syntax:
|
🎉 Copied!
|
|
Unlike Unicode Special characters that depend on installed fonts, the emoji are always available. Furthermore, emoji are already colored, but you can recolor them if you like (see examples above). One can pick emoji from the emoji cheat sheet, the Unicode full-emoji-list, or the flat list emoji.txt in the plantuml source. You can also use the following PlantUML command to list available emoji:
@startuml
emoji <block>
@enduml
As of 13 April 2023, you can select between 1174 emoji from the following Unicode blocks:
- Unicode block 26: 83 emoji
- Unicode block 27: 33 emoji
- Unicode block 1F3: 246 emoji
- Unicode block 1F4: 255 emoji
- Unicode block 1F5: 136 emoji
- Unicode block 1F6: 181 emoji
- Unicode block 1F9: 240 emoji
Unicode block 26
|
🎉 Copied!
|
|
Horizontal lines
|
🎉 Copied!
|
|
Links
You can also use URL and links.
Simple links are define using two square brackets (or three square brackets for field or method on class diagram).
Example:
[[http://plantuml.com]][[http://plantuml.com This label is printed]][[http://plantuml.com{Optional tooltip} This label is printed]]
Code
You can use <code> to display some programming code in your diagram
(sorry, syntax highlighting is not yet supported).
|
🎉 Copied!
|
|
This is especially useful to illustrate some PlantUML code and the resulting rendering:
|
🎉 Copied!
|
|
Table
Create a table
It is possible to build table, with| separator.
|
🎉 Copied!
|
|
Align fields using Table
You can use a table to align "fields" of class members. The example below (taken from buildingSmart Data Dictionary shows for each member: icon, name, datatype and cardinality. Use the<#transparent,#transparent> color specification so table cells have no foreground and background color.
(The example also shows the use of icons)
|
🎉 Copied!
|
|
You can also try to use tabs
\t and skinparam tabSize n to align fields, but this doesn't work so well: [Ref. QA-3820]
Add color on rows or cells
You can specify background colors of rows and cells:
|
🎉 Copied!
|
|
Add color on border and text
You can also specify colors of text and borders.
|
🎉 Copied!
|
|
[Ref. QA-7184]
No border or same color as the background
You can also set the border color to the same color as the background.
|
🎉 Copied!
|
|
[Ref. QA-12448]
Bold header or not
= as the first char of a cell indicates whether to make it bold (usually used for headers), or not.
|
🎉 Copied!
|
|
[Ref. QA-10923]
Tree
You can use |_ characters to build a tree.
On common commands, like title:
|
🎉 Copied!
|
|
On Class diagram. (Please note how we have to use an empty second compartment, else the parentheses in (Model) cause that text to be moved to a separate first compartment):
|
🎉 Copied!
|
|
[Ref. QA-3448]
On Component or Deployment diagrams:
|
🎉 Copied!
|
|
[Ref. QA-11365]
Special characters
It's possible to use any unicode character,
either directly or with syntax &#nnnnnn; (decimal) or <U+XXXXX> (hex):
|
🎉 Copied!
|
|
Please note that not all Unicode chars appear correctly, depending on installed fonts.
- You can use the listfonts command with a test string of your desired characters, to see which fonts may include them.
- For characters that are emoji, it's better to use the Emoji notation that doesn't depend on installed fonts, and the emoji are colored.
- The PlantUML server has the "Noto Emoji" font that has most emoji. If you want to render diagrams on your local system, you should check which fonts you have.
- Unfortunately "Noto Emoji" lacks normal chars, so you need to switch fonts, eg
|
🎉 Copied!
|
|
See Issue 72 for more details.
Legacy HTML
You can mix Creole with the following HTML tags:
<b>for bold text<u>or<u:#AAAAAA>or<u:[[color|colorName]]>for underline<i>for italic<s>or<s:#AAAAAA>or<s:[[color|colorName]]>for strike text<w>or<w:#AAAAAA>or<w:[[color|colorName]]>for wave underline text<plain>for plain text<color:#AAAAAA>or<color:[[color|colorName]]><back:#AAAAAA>or<back:[[color|colorName]]>for background color<size:nn>to change font size<img:file>: the file must be accessible by the filesystem<img:https://plantuml.com/logo3.png>: the URL must be available from the Internet{scale:nn}to change image size, eg<img:file.png{scale=0.3}>
|
🎉 Copied!
|
|
Common HTML element
|
🎉 Copied!
|
|
[Ref. QA-5254 for
plain]
Subscript and Superscript element [sub, sup]
|
🎉 Copied!
|
|
OpenIconic
OpenIconic is a very nice open-source icon set.
Those icons are integrated in the creole parser, so you can use them out-of-the-box.
Use the following syntax: <&ICON_NAME>.
|
🎉 Copied!
|
|
The complete list is available with the following special command:
|
🎉 Copied!
|
|
Appendix: Examples of "Creole List" on all diagrams
Activity
|
🎉 Copied!
|
|
Class
FIXME
🚩
- Sub item
- Sub sub item
FIXME
|
🎉 Copied!
|
|
Component, Deployment, Use-Case
|
🎉 Copied!
|
|
DONE
[Corrected in V1.2020.18]
Gantt project planning
N/AObject
FIXME
🚩
- Sub item
- Sub sub item
FIXME
|
🎉 Copied!
|
|
MindMap
|
🎉 Copied!
|
|
Network (nwdiag)
|
🎉 Copied!
|
|
Note
|
🎉 Copied!
|
|
Sequence
|
🎉 Copied!
|
|
[Ref. QA-15232]
State
|
🎉 Copied!
|
|
[Ref. QA-16978]
WBS
|
🎉 Copied!
|
|
Appendix: Examples of "Creole horizontal lines" on all diagrams
Activity
FIXME
🚩
strong line
____
FIXME
|
🎉 Copied!
|
|
Class
|
🎉 Copied!
|
|
Component, Deployment, Use-Case
|
🎉 Copied!
|
|
Gantt project planning
N/AObject
|
🎉 Copied!
|
|
DONE
[Corrected on V1.2020.18]
MindMap
FIXME
🚩
strong line
____
FIXME
|
🎉 Copied!
|
|
Network (nwdiag)
|
🎉 Copied!
|
|
Note
|
🎉 Copied!
|
|
Sequence
|
🎉 Copied!
|
|
[Ref. QA-15232]
State
|
🎉 Copied!
|
|
WBS
FIXME
🚩
strong line
____
FIXME
|
🎉 Copied!
|
|
Style equivalent (between Creole and HTML)
| Style | Creole | Legacy HTML like |
| bold |
This is **bold**
|
This is <b>bold</b>
|
| italics |
This is //italics//
|
This is <i>italics</i>
|
monospaced
|
This is ""monospaced""
|
This is <font:monospaced>monospaced</font>
|
|
|
This is --stroked--
|
This is <s>stroked</s>
|
| underlined |
This is __underlined__
|
This is <u>underlined</u>
|
| waved |
This is ~~waved~~
|
This is <w>waved</w>
|
|
🎉 Copied!
|
|
Creole on Creole
You can use Creole or HTML Creole on Creole diagram:
|
🎉 Copied!
|
|