Wiki source code of PlantUML
Last modified by Vincent Massol on 2026/10/21 20:28
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
![]() |
4.2 | 1 | Besides the ##plantuml## macro, the [[PlantUML Macro>>doc:extensions:Extension.PlantUML.PlantUMLMacro.WebHome]] extension provides Java components that generate PlantUML diagrams, which other extensions can use. They are listed in [[Java API>>doc:documentation.extensions.dev.plantuml.java-api.WebHome]]. There is no script service: use them from Java. |
![]() |
2.1 | 2 | |
| 3 | The macro relies on the same components, as follows. | ||
| 4 | |||
| 5 | {{plantuml}} | ||
| 6 | @startuml | ||
| 7 | !theme bluegray | ||
| 8 | component "plantuml macro" as Macro | ||
| 9 | component PlantUMLRenderer as Renderer | ||
| 10 | component PlantUMLGenerator as Generator | ||
| 11 | component PlantUMLConfiguration as Configuration | ||
| 12 | component "PlantUML library" as Library | ||
| 13 | cloud "PlantUML server" as Server | ||
| 14 | |||
| 15 | Macro --> Configuration : server and format | ||
| 16 | Macro --> Renderer : diagram text | ||
| 17 | Renderer --> Generator | ||
| 18 | Generator --> Library : no server | ||
| 19 | Generator --> Server : server URL | ||
| 20 | @enduml | ||
| 21 | {{/plantuml}} | ||
| 22 | |||
| 23 | * ##PlantUMLRenderer## turns the text of a diagram into a rendering block: an image, an SVG drawing or a text block, depending on the format. | ||
| 24 | * ##PlantUMLGenerator## writes the diagram to a stream. Without a server URL, it calls the PlantUML library inside XWiki. Otherwise it requests the diagram from the server, in the requested format. | ||
| 25 | * The text of the diagram is sent in the URL of that request, encoded with the [[PlantUML text encoding>>https://plantuml.com/text-encoding]]. | ||
| 26 | * ##PlantUMLConfiguration## gives the configuration described in [[Configuration Properties>>doc:documentation.extensions.admin.plantuml.configuration.WebHome]]. |
