No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<bookshelf src="Book:User manual" />
{{DISPLAYTITLE:Drawio}}
{{DISPLAYTITLE:Drawio}}


Line 10: Line 9:
#'''Click''' ''Insert''.  
#'''Click''' ''Insert''.  
#This opens a dialog box. '''Enter''' a name for your drawing. This name is used to version your diagram as a PNG file in the wiki.
#This opens a dialog box. '''Enter''' a name for your drawing. This name is used to version your diagram as a PNG file in the wiki.
#'''Click''' ''Insert.'' [[File:Manual:Manual Extension DrawioEditor 1748351273074.png|alt=drawio insert dialog|thumb|drawio insert dialog|center]]
##In addition, you can add an imag description (for screenreaders) and the alignment of the diagram.
# This inserts the tag <code><nowiki><drawio filename="<nameoffile>"></nowiki></code> in your source code.
#'''Click''' ''Insert. This inserts the tag <code><nowiki><Drawio filename="<nameoffile>"></nowiki></code> in your source code.'' [[File:Manual:Manual Extension DrawioEditor 1748351273074.png|alt=drawio insert dialog|thumb|Drawio insert dialog|center]]
#'''Save''' the page.
#'''Save''' the page.
The drawio editor is now available on the page.
The Drawio editor is now available on the page.
[[File:DrawioEditor placeholder.png|alt=Drawio placeholder and [Edit] link|center|thumb|600x600px|Drawio placeholder and [Edit] link]]
[[File:DrawioEditor placeholder.png|alt=Drawio placeholder and [Edit] link|center|thumb|600x600px|Drawio placeholder and [Edit] link]]


Line 19: Line 18:
{{Messagebox|boxtype=note|icon=|Note text=To open the drawio editor, you always click on the ''[Edit]'' link in '''page view mode'''.|bgcolor=}}
{{Messagebox|boxtype=note|icon=|Note text=To open the drawio editor, you always click on the ''[Edit]'' link in '''page view mode'''.|bgcolor=}}
'''To edit the diagram:'''
'''To edit the diagram:'''
#'''Click''' ''Edit''  on the saved page next to the drawio placeholder or your already saved diagram. [[File:800px-drawio-processchart.png|alt=draw.io chart|center|thumb|432x432px|the open drawio editor]]
#'''Click''' ''Edit''  on the saved page next to the Drawio placeholder or your already saved diagram. [[File:800px-drawio-processchart.png|alt=draw.io chart|center|thumb|432x432px|the open Drawio editor]]
#'''Add''' any needed shapes to your diagram.
#'''Add''' any needed shapes to your diagram.
#'''Click''' ''Save''  in the drawio window to save your drawing.
#'''Click''' ''Save''  in the Drawio window to save your drawing.
#'''Click''' ''Exit'' next to the ''Save'' button to close the editor.
#'''Click''' ''Exit'' next to the ''Save'' button to close the editor.


Line 37: Line 36:
If you don't see the changes yet, click F5 on your keyboard to refresh the page.
If you don't see the changes yet, click F5 on your keyboard to refresh the page.


=== Remove auto-resizing auf Drawio images (PNG only) {{Bsvs|bsvTo=5.1}} ===
The following information only applies to Drawio diagrams that are embedded as PNG.
{{Textbox|boxtype=important|header=Avoid auto-resizing of linked shapes:|text=By default, drawio images are resized to  always fit into the content area.
{{Textbox|boxtype=important|header=Avoid auto-resizing of linked shapes:|text=By default, drawio images are resized to  always fit into the content area.


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}}
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}}
===Remove auto-resizing auf drawio images===
Add the following rules to ''MediaWiki:Common.css''
Add the following rules to MediaWiki:Common.css<syntaxhighlight language="css">
 
<syntaxhighlight language="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 55: Line 57:
</syntaxhighlight>
</syntaxhighlight>


This will remove the auto-resizing behavior from all drawio preview images.  
This will remove the auto-resizing behavior from all Drawio preview images.  


To apply this styling to only some drawio images, you could add a wrapper to these images in source editing mode. For example:
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">
<syntaxhighlight language="text">
<div class="drawio-linked">
<div class="drawio-linked">
Line 65: Line 67:
</syntaxhighlight>
</syntaxhighlight>


In this case, do not add the above styles to your Common.css, but use these rules instead:
In this case, do not add the above styles to your ''Common.css'', but use these rules instead:


<syntaxhighlight language="css">
<syntaxhighlight language="css">
Line 80: Line 82:
</syntaxhighlight>
</syntaxhighlight>


==PNG and SVG format==
==PNG and SVG Format{{Bsvs|bsvFrom=5.1.1}}==
In BlueSpice, drawio diagrams are saved in PNG format by default. It is possible to [[Reference:DrawioEditor|configure "svg" as image type]].
Up to BlueSpice 5.1, Drawio diagrams were always saved and previewed in PNG format.
 
Starting with BlueSpice 5.1.1, newly created diagrams are saved and previewed in SVG format. Along with the diagram, a link to the versioning page is also generated in BlueSpice 5.1.1.
[[File:drawio_svg.png|alt=Diagram with a square shape labelled "Hallo Welt!". It also shows a link to the file versioning page.|center|thumb|750x750px|diagram saved in .svg format]]
The link to the versioning page can be hidden for the entire wiki using the ''MediaWiki:Common.css'' page: <syntaxhighlight lang="css">
/* hide drawio caption for BlueSpice 5.1.1 */
.drawio-caption {display:none;}
</syntaxhighlight>
 
== 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>
 
== Import of existing diagrams ==
== Import of existing diagrams ==
===Visio diagrams===
===Visio diagrams===
[[File:750px-drawio-import_vsdx.png|alt=Importing a .vsdx file|center|thumb|565x565px|Importing a .vsdx file]]
[[File:750px-drawio-import_vsdx.png|alt=Importing a .vsdx file|center|thumb|565x565px|Importing a .vsdx file]]
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 />
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 />


{{Box Links-en
{{Box Links-en
Line 93: Line 113:
|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.
|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.
}}
}}
[[en:{{FULLPAGENAME}}]]
{{translation}}
[[de:Handbuch:Erweiterung/DrawioEditor]]
[[Category:Editing]]
[[Category:Editing]]

Latest revision as of 09:45, 8 October 2025



Drawio offers extensive drawing possibilities for process 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:

  1. Create or choose a page where you want to insert a drawing.
  2. Open Content droplet menu from the editor toolbar.
    Content Droplet dialog and selection of Diagram
    Diagram Content Droplet
  3. Choose diagram from the list of content droplets.
  4. Click Insert.
  5. This opens a dialog box. Enter a name for your drawing. This name is used to version your diagram as a PNG file in the wiki.
    1. In addition, you can add an imag description (for screenreaders) and the alignment of the diagram.
  6. Click Insert. This inserts the tag <Drawio filename="<nameoffile>"> in your source code.
    drawio insert dialog
    Drawio insert dialog
  7. Save the page.

The Drawio editor is now available on the page.

Drawio placeholder and [Edit] link
Drawio placeholder and [Edit] link

Editing the diagram

Note:To open the drawio editor, you always click on the [Edit] link in page view mode.

To edit the diagram:

  1. Click Edit on the saved page next to the Drawio placeholder or your already saved diagram.
    draw.io chart
    the open Drawio editor
  2. Add any needed shapes to your diagram.
  3. Click Save in the Drawio window to save your drawing.
  4. Click Exit next to the Save button to close the editor.

Adding links to shapes

To add a link to a shape:

  1. Right-click to open the shape menu.
  2. Click Edit Link.
    Shape menu
    Shape menu
  3. Provide the full path of the link.
    The full path must also be specified for internal wiki pages (example external link: https://bluespice.com, example internal link: https://de.wiki.bluespice.com/wiki/Manual:Extension/DrawioEditor).
    Note: The displayed dropdown menu currently has no function in BlueSpice.
    annotated screenshot of the "edit link" dialog
    (1) Enter full url link path (2) Link can be opened in new window (3) Dropdown is not used in BlueSpice.
  4. Click Apply.
  5. Repeat steps 1-4 for other shapes in the diagram.
  6. Click Save.
  7. Click Exit to close the editor.

If you don't see the changes yet, click F5 on your keyboard to refresh the page.

Remove auto-resizing auf Drawio images (PNG only)   -v5.1

The following information only applies to Drawio diagrams that are embedded as PNG.

Avoid auto-resizing of linked shapes:

By default, drawio images are resized to always fit into the content area.

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.

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;
}

This will remove the auto-resizing behavior from all Drawio preview images.

To apply this styling to only some Drawio images, you could add a wrapper to these images in source editing mode. For example:

<div class="drawio-linked">
<drawio filename="processmap" alt="Processmap showing the management, core, and supporting processes ">
</drawio>
</div>

In this case, do not add the above styles to your Common.css, but use these rules instead:

/*Drawio png - do not auto-resize drawio diagrams that are wrapped in a container with class drawio-linked */
.drawio-linked {
    overflow-x:scroll 
}

.drawio-linked img {
    height: initial!important;
    max-width: initial!important;
    width: initial!important;
}

PNG and SVG Format  v5.1.1+

Up to BlueSpice 5.1, Drawio diagrams were always saved and previewed in PNG format.

Starting with BlueSpice 5.1.1, newly created diagrams are saved and previewed in SVG format. Along with the diagram, a link to the versioning page is also generated in BlueSpice 5.1.1.

Diagram with a square shape labelled "Hallo Welt!". It also shows a link to the file versioning page.
diagram saved in .svg format

The link to the versioning page can be hidden for the entire wiki using the MediaWiki:Common.css page:

/* hide drawio caption for BlueSpice 5.1.1 */
.drawio-caption {display:none;}

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:

/** ERM42590*/
.pdfcreator-type-page .drawio-table-test img {
	max-width: 10cm !important;
}

Import of existing diagrams

Visio diagrams

Importing a .vsdx file
Importing a .vsdx file

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.

Related info



PDF exclude - start

To submit feedback about this documentation, visit our community forum.

PDF exclude - end