Set custom default styles for shapes and connectors
While you can set your own default style while editing a diagram (and this is saved in your browser), an administrator can add custom global default style information to the draw.io configuration in Confluence Cloud.
defaultVertexStyle
sets the default style for shapes.defaultEdgeStyle
sets the default style for connectors.
Set up global custom styles in Confluence Cloud
- Go to the draw.io Configuration section of your Confluence Cloud settings.
- Add the style settings to the JSON text entry area on the draw.io Configuration tab. Make sure that each of the two options is formatted as a single line.
- To find more key and value pairs, set the style you want on a shape or connector in a draw.io diagram in the editor, and click Edit Style in the Style tab of the format panel, or use the keyboard shortcut
Ctrl+E
(Cmd+E
). As this configuration overrides everything else inherited from other styles or themes, it is recommended to set new defaults for as few key/value pairs as possible. - Click Save when you are finished.
{
"defaultVertexStyle": {"fontFamily":"Courier New", "fillColor":"#dae8fc", "strokeColor":"#6c8ebf", "strokeWidth":"1"},
"defaultEdgeStyle": {"fontFamily":"Courier New", "edgeStyle":"orthogonalEdgeStyle", "rounded":"1", "jettySize":"auto", "orthogonalLoop":"1", "fillColor":"#dae8fc", "strokeColor":"#6c8ebf"}
}
Now, whenever a new user creates a diagram, shapes added to the drawing canvas will follow this style.
As a user, change your personal default styles
- While editing a diagram, change the style of a shape to be what you want to use by default.
- Select it, then in click on Set as Default Style in the Style tab of the format panel.
- Repeat for the connector style.
Your personal defaults are stored in your browser. If you clear your browser data, these settings will be erased, and you will return to using the global default styles.
Reset personal default styles
- Make sure nothing in your diagram is selected.
- Click on Clear Default Style at the bottom of the Style tab in the format panel.
This resets the default style to the global defaults. If an administrator has set up a custom default style, this is what shapes will use when you add them to the drawing canvas.