Custom Templates

With this feature users can create reusable templates out of their PlantUML diagrams. Those templates can then be used to quickly create similar diagrams. Templates are stored as attachments on pre-configured Confluence page. Because of this, template permissions are set on page level. Admin can create company-wide templates or user-specific ones simply by setting access to the page containing Template attachments.

Pre-requisites

User must have PlantUML settings enabled before continuing with Custom Templates setup. User will need to perform one-click automatic setup before continuing. Only diagrams created after November 2022 can be used as templates because of the new SVG format.

Click on a button to create PlantUML settings

Setup

PlantUML Templates require “Template Root Page” to be created. It can be stored in any Space with proper access permissions. Note that PlantUML settings create separate space and you can use that space to store PlantUML Templates too. Just create separate Page for “Template Root Page”, do not use existing page in that Space. All Child pages of “Template Root Page” represent template categories. Each category is one entry in editor’s Templates popup. By setting access permissions to each page Admin can restrict access to some Template categories. This means every user can have it’s private templates and shared public Templates.

Setup for the Templates Root Page

Now create several Child pages for “Templates Root Page“ named “PlantUML Templates“.

Add needed template diagrams to each page. Templates are regular diagrams. Just open child page in edit mode and add PlantUML diagram you want to use as Template. After Adding diagrams to Child pages PlantUML editor will show something like this:

Note that every Child page is represented as separate item in the main menu. Every diagram on that page is entry on the right. Select diagram you wish to use as template and click on “Select” button. It will populate Editor with diagram data and show preview. Now you can continue editing diagram.