(4 intermediate revisions by the same user not shown)
Line 4:
Line 4:
'''To create a diagram''':
'''To create a diagram''':
#Create or open the page where the diagram is to be inserted.
#Create or open the page where the diagram is to be inserted.
#In the [[Extension/VisualEditor|VisualEditor]] toolbar, open the '''Content droplet''' menu. [[File:Manual Extension DrawioEditor 1748351104784.png|alt=Content Droplet dialog and selection of Diagram|center|thumb|400x400px|Diagram Content Droplet]]
#In the [[Extension/VisualEditor|VisualEditor]] toolbar, open the '''Content droplet''' menu. [[File:drawio-content-droplet-diagram.png|alt=Content Droplet dialog with Diagram selected|center|thumb|400x400px|Diagram Content Droplet]]
#Select '''diagram'''.
#Select '''diagram'''.
#Select '''Insert'''. A dialog opens with the following options:
#Select '''Insert'''. A dialog opens with the following options:
Line 13:
Line 13:
#*'''Image description''': Enter alternative text for screen readers. The text is not displayed when the page is viewed.
#*'''Image description''': Enter alternative text for screen readers. The text is not displayed when the page is viewed.
#*'''Image alignment''': Set the horizontal alignment of the diagram in the page content area.
#*'''Image alignment''': Set the horizontal alignment of the diagram in the page content area.
#Select '''Insert'''. The Drawio diagram is inserted into the page. [[File:drawio inspector.png|alt="Insert" dialog window for an org chart|center|thumb|259x259px|Drawio "insert"-dialog window]]
#Select '''Insert'''. The Drawio diagram is inserted into the page. [[File:drawio-insert-dialog-org-chart.png|alt="Insert" dialog window for an org chart|center|thumb|259x259px|Drawio "Insert" dialog window]]
#Save the page. <br>
#Save the page. <br>
The diagram is now available on the page for editing. [[File:DrawioEditor placeholder.png|alt=Drawio placeholder and [Edit] link|center|thumb|600x600px|Drawio placeholder and [Edit] link]]
The diagram is now available on the page for editing. [[File:drawio-placeholder-edit-link.png|alt=Drawio placeholder with an Edit link|center|thumb|600x600px|Drawio placeholder and Edit link]]
{{Textbox|boxtype=important|header=Important:|text=Each diagram must have a unique name in the wiki. If multiple diagrams have the same name, they use the same file, and saving one diagram can overwrite another.|icon=yes}}
{{Textbox|boxtype=important|header=Important:|text=Each diagram must have a unique name in the wiki. If multiple diagrams have the same name, they use the same file, and saving one diagram can overwrite another.|icon=yes}}
==Edit a diagram==
==Edit a diagram==
Line 34:
Line 34:
Links can be added to shapes in a Drawio diagram to open wiki pages. <br>
Links can be added to shapes in a Drawio diagram to open wiki pages. <br>
'''To add a link to a shape''':
'''To add a link to a shape''':
#Right-click the shape and select '''Edit Link'''.
#Right-click the shape and select '''Edit Link'''. [[File:drawio-shape-menu.png|alt=Shape menu|center|thumb|650x650px|Shape menu]]
#Enter the path to the target page. For an internal wiki page, include the subwiki name in the path. For example: <code>/HR/wiki/Main Page</code> or <code>/IMS/wiki/Main Page</code>. The page-selection dropdown currently has no function in BlueSpice.
#Enter the path to the target page. For an internal wiki page, include the subwiki name in the path. For example: <code>/HR/wiki/Main Page</code> or <code>/IMS/wiki/Main Page</code>. The page-selection dropdown currently has no function in BlueSpice.
#Select '''Apply'''.
#Select '''Apply'''.
Line 45:
Line 45:
A '''Details''' link is generated with the diagram. It links to the versioning page for the diagram.
A '''Details''' link is generated with the diagram. It links to the versioning page for the diagram.
==Import an existing diagram==
==Import an existing diagram==
[[File:drawio-import-vsdx.png|alt=Importing a .vsdx file|center|thumb|565x565px|Importing a .vsdx file]]
Existing Visio diagrams in <code>.vsdx</code> format can be imported into the Drawio editor and edited further. <br>
Existing Visio diagrams in <code>.vsdx</code> format can be imported into the Drawio editor and edited further. <br>
'''To import a Visio diagram''':
'''To import a Visio diagram''':
Line 60:
Line 61:
}</syntaxhighlight>
}</syntaxhighlight>
==Prevent automatic resizing of linked PNG diagrams==
==Prevent automatic resizing of linked PNG diagrams==
By default, Drawio PNG images are automatically resized to fit the content area. For diagrams with links on shapes, this can cause the link boundaries to no longer match the shapes because the links are based on image map coordinates. <br>
By default, Drawio PNG images are automatically resized to fit the content area. For diagrams with links on shapes, this can cause the link boundaries to no longer match the shapes because the links are based on image map coordinates. <br>Automatic resizing can be disabled with CSS.
Automatic resizing can be disabled with CSS.
===Disable resizing for all Drawio PNG images===
===Disable resizing for all Drawio PNG images===
Add the following rules to <code>MediaWiki:Common.css</code>:
Add the following rules to <code>MediaWiki:Common.css</code>:
<syntaxhighlight language="css">
<syntaxhighlight language="css" lang="css">
/*Drawio png - do not auto-resize preview images when links are added directly to the shapes */
/*Drawio png - do not auto-resize preview images when links are added directly to the shapes */
div[id*=drawio-img-box] {
div[id*=drawio-img-box] {
Line 79:
Line 79:
These rules disable automatic resizing for all Drawio preview images.
These rules disable automatic resizing for all Drawio preview images.
===Disable resizing for selected diagrams===
===Disable resizing for selected diagrams===
To apply the styling only to selected diagrams, wrap the <code><drawio></code> tag in a container with the <code>drawio-linked</code> class in source edit mode:
To apply the styling only to selected diagrams, wrap the <code><nowiki><drawio></nowiki></code> tag in a container with the <code><nowiki>drawio-linked</nowiki></code> class in source edit mode:
<syntaxhighlight language="text" lang="css">
<syntaxhighlight language="text" lang="css">
<div class="drawio-linked">
<div class="drawio-linked">
Line 87:
Line 87:
</syntaxhighlight>
</syntaxhighlight>
In this case, do not add the previous rules to <code>MediaWiki:Common.css</code>. Use the following rules instead:
In this case, do not add the previous rules to <code>MediaWiki:Common.css</code>. Use the following rules instead:
<syntaxhighlight language="css" lang="css">
<syntaxhighlight language="css" lang="css">/*Drawio png - do not auto-resize preview images when links are added directly to the shapes */
/*Drawio png - do not auto-resize preview images when links are added directly to the shapes */
.drawio-linked {
.drawio-linked {
overflow-x: scroll;
overflow-x: scroll;
Line 97:
Line 96:
max-width: initial !important;
max-width: initial !important;
width: initial !important;
width: initial !important;
}
}</syntaxhighlight>
</syntaxhighlight>
==Configuration==
==Configuration==
Administrators can configure Drawio in the [[Extension/BlueSpiceConfigManager|'''Config Manager''']]. The following settings are available:
Administrators can configure Drawio in the [[Extension/BlueSpiceConfigManager|'''Config Manager''']]. The following settings are available:
*'''Backend URL''': Specifies the base URL of the diagrams.net (formerly draw.io) backend service used for editing diagrams.
*'''Backend URL''': Specifies the base URL of the diagrams.net (formerly draw.io) backend service used for editing diagrams.
*'''Edit mode''': Specifies how the Drawio editor is displayed by default.
*'''Edit mode''': Specifies how the Drawio editor is displayed by default.
Latest revision as of 14:34, 19 August 2026
done Drawio allows diagrams to be created and edited directly in a wiki page. It can be used for flowcharts, process diagrams, decision trees, infographics, and other visualizations.
Important:Each diagram must have a unique name in the wiki. If multiple diagrams have the same name, they use the same file, and saving one diagram can overwrite another.
Edit a diagram
To edit a diagram:
In page view, select Edit next to the Drawio placeholder or saved diagram.
Make the required changes in the Drawio editor.
Select Save in the Drawio editor.
Select Exit next to Save to close the editor.
The changes are saved with the diagram.
Change the Drawio theme
The Drawio editor uses the minimal theme by default.
The following themes are supported:
minimal
classic
dark
To use a different theme, add the theme attribute to the drawio tag in source edit mode. For example:
<drawio filename="Org chart" editmode="inline" theme="classic" alignment="center" alt="Tree view of all departments with current roles" />
Add links to shapes
Links can be added to shapes in a Drawio diagram to open wiki pages. To add a link to a shape:
Right-click the shape and select Edit Link. Shape menuShape menu
Enter the path to the target page. For an internal wiki page, include the subwiki name in the path. For example: /HR/wiki/Main Page or /IMS/wiki/Main Page. The page-selection dropdown currently has no function in BlueSpice.
Select Apply.
Repeat steps 1-3 for other shapes as needed.
Select Save.
Select Exit to close the Drawio editor.
If the changes are not displayed after exiting the editor, refresh the page with F5.
Diagram format
Newly created Drawio diagrams are saved and displayed in SVG format.
A Details link is generated with the diagram. It links to the versioning page for the diagram.
Existing Visio diagrams in .vsdx format can be imported into the Drawio editor and edited further. To import a Visio diagram:
Insert a Drawio diagram on a wiki page.
In the Drawio editor, select File > Import From > Device.
Select the .vsdx file to import.
Edit the imported diagram as needed.
Use diagrams in tables and page layouts
Drawio diagrams in table cells or page layouts can cause problems with editing and with how the diagrams are displayed in PDF exports.
For better results, create the Drawio diagram on a separate wiki page and insert the resulting image into the table cell or page layout with the required dimensions.
If a Drawio diagram is created directly in a table cell, additional CSS on MediaWiki:Common.css can be used to control its size in PDF exports:
By default, Drawio PNG images are automatically resized to fit the content area. For diagrams with links on shapes, this can cause the link boundaries to no longer match the shapes because the links are based on image map coordinates. Automatic resizing can be disabled with CSS.
Disable resizing for all Drawio PNG images
Add the following rules to MediaWiki:Common.css:
/*Drawio png - do not auto-resize preview images when links are added directly to the shapes */div[id*=drawio-img-box]{overflow-x:scroll}/*Drawio png - do not auto-resize preview images when links are created as image maps from file description page */div[id*=drawio-img-box]img{height:initial;max-width:initial;width:initial;}
These rules disable automatic resizing for all Drawio preview images.
Disable resizing for selected diagrams
To apply the styling only to selected diagrams, wrap the <drawio> tag in a container with the drawio-linked class in source edit mode:
<divclass="drawio-linked"><drawiofilename="processmap"alt="Processmap showing the management, core, and supporting processes "></drawio></div>
In this case, do not add the previous rules to MediaWiki:Common.css. Use the following rules instead:
/*Drawio png - do not auto-resize preview images when links are added directly to the shapes */.drawio-linked{overflow-x:scroll;}.drawio-linkedimg{height:initial!important;max-width:initial!important;width:initial!important;}
Configuration
Administrators can configure Drawio in the Config Manager. The following settings are available:
Backend URL: Specifies the base URL of the diagrams.net (formerly draw.io) backend service used for editing diagrams.
Edit mode: Specifies how the Drawio editor is displayed by default.