Wiki source code of Set a Default Diagram Style
Last modified by superadmin on 2026/11/25 21:24
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{version since="2.6" product="PlantUML Macro"}}Give all the PlantUML diagrams of the wiki the same look, for example a theme and an accessible color palette, without repeating it in each diagram.{{/version}} | ||
| 2 | |||
| 3 | 1. Open the wiki administration and go to the "PlantUML" section, added by the [[PlantUML Administration>>doc:extensions:Extension.PlantUML.PlantUMLAdministration.WebHome]] extension. | ||
| 4 | 1. In "Default Diagram Style", enter the PlantUML lines to insert at the top of every diagram, for example:((( | ||
| 5 | {{code language="none"}} | ||
| 6 | !theme bluegray | ||
| 7 | skinparam ArrowColor #0568AE | ||
| 8 | skinparam participant { | ||
| 9 | BackgroundColor #0568AE | ||
| 10 | FontColor #FFFFFF | ||
| 11 | } | ||
| 12 | {{/code}} | ||
| 13 | |||
| 14 | {{image reference="default-diagram-style-field.png" size="large" alt="PlantUML section of the wiki administration with the Default Diagram Style field highlighted"/}} | ||
| 15 | ))) | ||
| 16 | 1. Click "Save". | ||
| 17 | 1. View a page holding a PlantUML diagram that doesn't set its own ##!theme##. The diagram uses the default style.((( | ||
| 18 | {{image reference="diagram-default-style.png" size="medium" alt="Sequence diagram drawn with the bluegray theme and blue participants set by the default style"/}} | ||
| 19 | ))) |