Created page with "{{DISPLAYTITLE:Drawio}} '''Drawio''' offers extensive drawing possibilities for flowcharts, infographics and other visualizations on a wiki page. Descriptive graphics like process chains or decision trees can be constructed directly on a wiki page. ==Embedding the Drawio editor== '''To insert a drawing in the visual editor:''' #'''Create or choose''' a page where you want to insert a drawing. #'''Open''' ''Content droplet'' menu from..."
'''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.
'''Drawio''' offers extensive drawing possibilities for flowcharts, infographics and other visualizations on a wiki page. Descriptive graphics like process chains or decision trees can be constructed directly on a wiki page.
==Insert a diagram==
==Embedding the Drawio editor==
'''To create a diagram''':
'''To insert a drawing in the [[Manual:Extension/VisualEditor|visual editor]]:'''
#Create or open the page where the diagram is to be inserted.
#'''Create or choose''' a page where you want to insert a drawing.
#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]]
#'''Open''' ''Content droplet'' menu from the editor toolbar.[[File:Manual Extension DrawioEditor 1748351104784.png|alt=Content Droplet dialog and selection of Diagram|center|thumb|400x400px|Diagram Content Droplet]]
#Select '''diagram'''.
#'''Choose''' ''diagram'' from the list of content droplets.
#Select '''Insert'''. A dialog opens with the following options:
#'''Click''' ''Insert''. This opens a dialog box. The following properties can be set:
#*'''Name''': Enter a unique name for the diagram. This name is used as the image name in the wiki.
##'''Name:''' Name of the drawio diagram is used for the image name that stores the diagram in the wiki.
#*'''Edit mode''': Choose how the Drawio editor is displayed:
##'''Edit mode'''{{Bsvs|bsvFrom=5.2}}''':''' ''Fullscreen view'' opens the drawio editor in the entire browser window, ''Page view'' shows the drawio editor in the page content area.
#**'''Fullscreen view''': Opens the Drawio editor in the entire browser window.
##'''Image description:''' Alternative image text for screenreaders. It is not displayed on the page in view mode.
#**'''Page view''': Displays the Drawio editor in the page content area.
##'''Image alignment:''' Horizontal alignment of the diagram in the page content area.
#*'''Image description''': Enter alternative text for screen readers. The text is not displayed when the page is viewed.
#'''Click''' ''Insert.'' This inserts the <code><nowiki><drawio></nowiki></code>-tag in your page.[[File:drawio inspector.png|alt="Insert" dialog window for an org chart|center|thumb|259x259px|Drawio "insert"-dialog window]]
#*'''Image alignment''': Set the horizontal alignment of the diagram in the page content area.
#'''Save''' the page.
#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]]
The Drawio editor is now available on the page.
#Save the page. <br>
[[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}}
==Edit a diagram==
{{Textbox|boxtype=important|header=Important!|text=You must assign a unique name to each diagram in the wiki. For example, if there are multiple Drawio diagrams named "Flowchart" in the wiki, the changes will overwrite each other because the same file is created when saving.|icon=yes}}
'''To edit a diagram''':
#In page view, select '''Edit''' next to the Drawio placeholder or saved diagram.
== Editing the diagram ==
#Make the required changes in the Drawio editor.
{{Messagebox|boxtype=note|icon=|Note text=To open the drawio editor, you always click on the ''[Edit]'' link in '''page view mode'''.|bgcolor=}}
#Select '''Save''' in the Drawio editor.
'''To edit the diagram:'''
#Select '''Exit''' next to '''Save''' to close the editor.<br>
#'''Click''' ''Edit'' on the saved page next to the Drawio placeholder or your already saved diagram.
The changes are saved with the diagram.
#'''Add''' any needed shapes to your diagram.
===Change the Drawio theme===
#'''Click''' ''Save'' in the Drawio window to save your drawing.
The Drawio editor uses the <code>minimal</code> theme by default. <br>
#'''Click''' ''Exit'' next to the ''Save'' button to close the editor.
The following themes are supported:
*<code> minimal</code>
Starting with BlueSpice {{Bsvs|bsvFrom=5.2.2}}, the drawio editor is loaded with the "minimal" theme. A different theme can only be defined in source edit mode of the page. Supported themes are: <code>minimal</code>, <code>classic</code>, <code>dark</code>:<syntaxhighlight lang="text">
*<code>classic</code>
<drawio filename="Org chart" editmode="inline" theme="classic" alignment="center" alt="Tree view of all departments with current roles" />
*<code>dark</code> <br>
</syntaxhighlight>
To use a different theme, add the <code>theme</code> attribute to the <code><nowiki>drawio</nowiki></code> tag in source edit mode. For example: <syntaxhighlight lang="text"> <drawio filename="Org chart" editmode="inline" theme="classic" alignment="center" alt="Tree view of all departments with current roles" /> </syntaxhighlight>
===Add links to shapes===
=== Adding links to shapes ===
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'''. [[File:drawio-shape-menu.png|alt=Shape menu|center|thumb|650x650px|Shape menu]]
# '''Right-click''' to open the 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.
# '''Provide''' the path to the page. <br />For internal wiki pages, the path usually starts with <code>/wiki/</code>, for example: <code>/wiki/Manual:Extension/DrawioEditor</code>. <br />'''Note:''' The displayed dropdown menu to select pages currently has no function in BlueSpice.
#Repeat steps 1-3 for other shapes as needed.
# '''Click''' ''Apply''.
#Select '''Save'''.
# '''Repeat''' steps 1-4 for other shapes in the diagram.
#Select '''Exit''' to close the Drawio editor. <br>
# '''Click''' ''Save''.
If the changes are not displayed after exiting the editor, refresh the page with '''F5'''.
# '''Click''' ''Exit'' to close the editor.
===Diagram format===
Newly created Drawio diagrams are saved and displayed in SVG format. <br>
If you don't see the changes yet, click <code>F5</code> on your keyboard to refresh the page.
A '''Details''' link is generated with the diagram. It links to the versioning page for the diagram.
==Import an existing diagram==
=== Remove auto-resizing auf Drawio images (PNG only) ===
[[File:drawio-import-vsdx.png|alt=Importing a .vsdx file|center|thumb|565x565px|Importing a .vsdx file]]
The following information only applies to Drawio diagrams that are embedded as PNG. {{Bsvs|bsvTo=5.1}}
Existing Visio diagrams in <code>.vsdx</code> format can be imported into the Drawio editor and edited further. <br>
{{Textbox|boxtype=important|header=Avoid auto-resizing of linked shapes:|text=By default, drawio images are resized to always fit into the content area.
'''To import a Visio diagram''':
#Insert a Drawio diagram on a wiki page.
Since the links are implemented as map coordinates, the png image cannot be resized without breaking the link boundaries. To avoid this, you can disable automatic resizing of your drawio images with the following css.|icon=yes}}
Add the following rules to ''MediaWiki:Common.css''
#Select the <code>.vsdx</code> 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. <br>
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. <br>
If a Drawio diagram is created directly in a table cell, additional CSS on <code>MediaWiki:Common.css</code> can be used to control its size in PDF exports:
<syntaxhighlight lang="css">/** ERM42590*/
.pdfcreator-type-page .drawio-table-test img {
max-width: 10cm !important;
}</syntaxhighlight>
==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>Automatic resizing can be disabled with CSS.
===Disable resizing for all Drawio PNG images===
Add the following rules to <code>MediaWiki:Common.css</code>:
<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 */
Line 65:
Line 77:
}
}
</syntaxhighlight>
</syntaxhighlight>
These rules disable automatic resizing for all Drawio preview images.
This will remove the auto-resizing behavior from all Drawio preview images.
===Disable resizing for selected diagrams===
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:
To apply this styling to only some Drawio images, you could add a wrapper to these images in source editing mode. For example:
<syntaxhighlight language="text" lang="css">
<syntaxhighlight language="text" lang="css">
<div class="drawio-linked">
<div class="drawio-linked">
Line 75:
Line 86:
</div>
</div>
</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 above styles to your ''Common.css'', but use these rules instead:
<syntaxhighlight language="css" lang="css">/*Drawio png - do not auto-resize preview images when links are added directly to the shapes */
<syntaxhighlight language="css" lang="css">
/*Drawio png - do not auto-resize drawio diagrams that are wrapped in a container with class drawio-linked */
.drawio-linked {
.drawio-linked {
overflow-x:scroll
overflow-x: scroll;
}
}
.drawio-linked img {
.drawio-linked img {
height: initial!important;
height: initial !important;
max-width: initial!important;
max-width: initial !important;
width: initial!important;
width: initial !important;
}
</syntaxhighlight>
==PNG and SVG Format==
Up to BlueSpice 5.1, Drawio diagrams were always saved and previewed in PNG format.
Starting with BlueSpice {{Bsvs|bsvFrom=5.1.1}}, newly created diagrams are saved and previewed in SVG format. Along with the diagram, a "Details" link to the versioning page is also generated.
== Drawio diagrams in table cells ==
It is not recommended to maintain Drawio diagrams in table cells since the editing experience and the display in PDF documents can cause issues. An alternative is to Create the Drawio file on a separate page and then insert the image file with proper dimensions in any table cell in the wiki. If you decide to create Drawio files directly in a table cell, you can control the sizing in PDF exports by adding the following CSS to MediaWiki:Common.css:
<syntaxhighlight lang="css">/** ERM42590*/
.pdfcreator-type-page .drawio-table-test img {
max-width: 10cm !important;
}</syntaxhighlight>
}</syntaxhighlight>
==Configuration==
== Import of existing diagrams ==
Administrators can configure Drawio in the [[Extension/BlueSpiceConfigManager|'''Config Manager''']]. The following settings are available:
===Visio diagrams===
*'''Backend URL''': Specifies the base URL of the diagrams.net (formerly draw.io) backend service used for editing diagrams.
[[File:750px-drawio-import_vsdx.png|alt=Importing a .vsdx file|center|thumb|565x565px|Importing a .vsdx file]]
*'''Edit mode''': Specifies how the Drawio editor is displayed by default.
You can import files with the extension .vsdx directly into the Drawio editor and edit them further. To do this, create a diagram on a wiki page. In the Drawio editor, choose ''File> Import From> Device''. You can then edit the imported diagram.<br />
==Configuration ==
Wiki admins can configure the following settings in the [[Manual:Extension/BlueSpiceConfigManager|Configuration manager]]:
|Topic4=Anja Ebersbach, [https://bluespice.com/draw-io-for-mediawiki-and-bluespice/ draw.io für MediaWiki und BlueSpice], BlueSpice News & Know How, February 13 2020.
}}
{{translation}}
[[Category:Editing]]
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.