hw>Mlink-rodrigue
No edit summary
 
Redaktion (talk | contribs)
No edit summary
Tag: 2017 source edit
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<bookshelf src="Book:User manual" />
{{DISPLAYTITLE:Drawio}}
{{DISPLAYTITLE:Drawio}}


'''Draw.io''' 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.
'''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.
==Inserting a chart==
==Embedding the Drawio editor==
'''To insert a drawing with VisualEditor:'''
'''To insert a drawing in the [[Manual:Extension/VisualEditor|visual editor]]:'''


#'''Create or choose''' a page where you want to insert a drawing.
#'''Create or choose''' a page where you want to insert a drawing.
#'''Select''' ''Insert > Magic word'' from the editor toolbar.
#'''Select''' ''Insert > Magic word'' from the editor toolbar.[[File:Manual:VE-insert-magicword.png|alt=Insert Magic word|center|thumb|300x300px|Insert ''Magic word'']]
#'''Choose''' ''drawio'' from the list of magic words.
#'''Choose''' ''drawio'' from the list of magic words.[[File:DrawioEditor drawio magic word.png|alt=Magic word "drawio"|center|thumb|450x450px|Magic word "drawio"]]
#'''Click''' ''Done''. This opens a dialog box. Enter a name for your drawing.
#'''Click''' ''Done''. 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:drawio-dialog.png|link=https://en.wiki.bluespice.com/wiki/File:Manual:drawio-dialog.png|alt=drawio dialog|center|450x450px]]This inserts the following tag in your source code <code><nowiki>{{#drawio:Name_of_the_flowchart}}</nowiki></code>
#'''Click''' ''Insert.'' [[File:drawio-dialog.png|link=https://en.wiki.bluespice.com/wiki/File:drawio-dialog.png|alt=drawio dialog|center|450x450px]]This inserts the tag <code><nowiki><drawio filename="<nameoffile>"></nowiki></code> in your source code.
#'''Save''' the page.
#'''Save''' 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]]


==Editing the drawing==


#'''Click''' ''Edit''  on the saved page above the drawio placeholder to open the draw.io editor. For the best editing experience, set your wiki into full-screen mode using the toggle button in the main toolbar.You can now edit your drawing.[[File:Manual:fullscreen-icon.png|alt=full-screen icon|center|133x133px|link=https://en.wiki.bluespice.com/wiki/File:Manual:fullscreen-icon.png]]
== Editing the diagram==
#'''Click''' ''Save''  in the draw.io window to save your drawing.
{{Messagebox|boxtype=note|icon=|Note text=To open the drawio editor, you always click on the ''[Edit]'' link in '''page view mode'''.|bgcolor=}}
#'''Click''' ''Exit'' next to the Save button in the draw.io window to close the draw.io editor.
'''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]]
#'''Add''' any needed shapes to your diagram.
#'''Click''' ''Save''  in the drawio window to save your drawing.
#'''Click''' ''Exit'' next to the ''Save'' button to close the editor.


[[File:Manual:drawio-processchart.png|alt=draw.io chart|center|thumb|550x550px|draw.io chart|link=https://en.wiki.bluespice.com/wiki/File:Manual:drawio-processchart.png]]<br />
=== Adding links to shapes ===
==About PNG and SVG files==
'''To add a link to a shape:'''
In BlueSpice, draw.io diagrams are always saved in PNG format. It is currently not possible to save diagrams in SVG formats. If you have installed your wiki in-house (i.e., you are not working in the cloud), you can [[mediawikiwiki:Extension:DrawioEditor|activate SVG support via an additional extension]].
 
==Import of existing diagrams==
# '''Right-click''' to open the shape menu.
===Visio diagrams===
# '''Click''' Edit Link.[[File:DrawioEditor shape menu.png|alt=Shape menu|center|thumb|650x650px|Shape menu]]
You can import files with the extension .vsdx directly into draw.io and edit them further. To do this, create an empty draw.io diagram on a wiki page. Save the empty diagram and then switch to draw.io's edit mode. From there, choose ''File> Import From> Device''. You can then edit the imported diagram in draw.io.
# '''Provide''' the full path of the link. <br />The full path must also be specified for internal wiki pages (example external link: <nowiki>https://bluespice.com</nowiki>, example internal link: <nowiki>https://de.wiki.bluespice.com/wiki/Manual:Extension/DrawioEditor</nowiki>). <br />'''Note:''' The displayed dropdown menu currently has no function in BlueSpice.[[File:DrawioEditor edit link.png|alt=annotated screenshot of the "edit link" dialog|center|thumb|500x500px|(1) Enter full url link path (2) Link can be opened in new window (3) Dropdown is not used in BlueSpice.]]
<br />
# '''Click''' ''Apply''.
[[File:Manual:drawio-import vsdx.png|alt=Importing a .vsdx file|center|thumb|750x750px|Importing a .vsdx file]]
# '''Repeat''' steps 1-4 for other shapes in the diagram.
# '''Click''' ''Save''.
# '''Click''' ''Exit'' to close the editor.
 
If you don't see the changes yet, click F5 on your keyboard to refresh the page.
 
{{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}}
===Remove auto-resizing auf drawio images===  
Add the following rules to MediaWiki:Common.css
<syntaxhighlight language="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;
}
</syntaxhighlight>
 
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:
<syntaxhighlight language="text">
<div class="drawio-linked">
<drawio filename="processmap" alt="Processmap showing the management, core, and supporting processes ">
</drawio>
</div>
</syntaxhighlight>
 
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 */
 
<syntaxhighlight language="css">
.drawio-linked {
    overflow-x:scroll
}


===SVG files===
.drawio-linked img {
When you import an SVG file into the BlueSpice draw.io editor, it is automatically converted into PNG format and can, therefore, no longer be edited. It is also not saved as an SVG file in the wiki. As an alternative to importing it into draw.io, you should upload the SVG file to the wiki and embed it on a wiki page. The versioning of the file cannot be done directly in the wiki. The updated version of the SVG file would then have to be updated accordingly via the file page by uploading it again.
    height: initial!important;
==Using draw.io with image maps==
    max-width: initial!important;
Draw.io creates a versioned png-file in the ''File'' namespace. This means that every change of the flowchart creates a new, updated version of this png-file. You can integrate this file on another page in your wiki or create an [[Reference:ImageMap|image map]].
    width: initial!important;
}
</syntaxhighlight>


{{Box Note|boxtype=note|Note text=It is not possible to use an image map on the same page as a drawio-diagram.}}
==PNG and SVG format==
In BlueSpice, drawio diagrams are always saved in PNG format. It is currently not possible to save diagrams in SVG format.
== Import of existing diagrams ==
===Visio diagrams===
[[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 />


{{Box Links-en
{{Box Links-en

Latest revision as of 10:48, 2 April 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. Select Insert > Magic word from the editor toolbar.
    Insert Magic word
    Insert Magic word
  3. Choose drawio from the list of magic words.
    Magic word "drawio"
    Magic word "drawio"
  4. Click Done. 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.
  5. Click Insert.
    drawio dialog
    This inserts the tag <drawio filename="<nameoffile>"> in your source code.
  6. 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.

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.

Remove auto-resizing auf drawio 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;
}

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

In BlueSpice, drawio diagrams are always saved in PNG format. It is currently not possible to save diagrams in SVG format.

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




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