====== diagramsnet Plugin ======
---- plugin ----
description:
author : todag
email :
type : syntax,action
lastupdate : 2020-08-12
compatible : Hogfather, Greebo
depends :
conflicts :
similar : drawio
tags : diagram, visio
downloadurl: https://github.com/todag/dokuwiki-plugin-diagramsnet/archive/refs/heads/master.zip
bugtracker : https://github.com/todag/dokuwiki-plugin-diagramsnet/issues
sourcerepo : https://github.com/todag/dokuwiki-plugin-diagramsnet
donationurl:
screenshot_img : https://raw.githubusercontent.com/todag/dokuwiki-plugin-diagramsnet/master/screenshot-1.png
----
===== Description =====
This plugin integrates [[https://www.diagrams.net|diagrams.net]] into DokuWiki. The full diagrams.net app is included in the plugin (currently version 13.6.2), and this will be used by default. But there is a setting available to instead use the online version at [[http://embed.diagrams.net|embed.diagrams.net]]
The plugin works by hijacking the Dokuwiki image renderer. If the file extension matches *.drawio.png or *.diagram.png (These are the defaults and can be changed) it will add an on_click action that will launch the diagram.net app to allow editing of the file.
===== Installation =====
Use the [[plugin:plugin|Plugin Manager]] or follow the guide at [[:plugins|Plugins]] to install manually.
===== Examples/Usage =====
To embed an existing diagram, or create a new one, use the toolbar button or enter the following code:
{{filename.diagram.png | Diagram Title}}
Namespaces are also supported
{{:NAMESPACE:filename.diagram.png|Diagram Title}}
The plugin uses DokuWikis image renderer, so you can use most options that are usable for embedded images, ie:
{{filename.diagram.png?100|Diagram Title}} << Changes size of image
{{ filename.diagram.png|Diagram Title}} << Aligns image to the right
===== Configuration and Settings =====
The plugin can be configured using the DokuWiki configuration manager available in the admin menu.
^ ''app_source_type'' | Use the included diagrams.net package (internal) or use the online version from external_url (external) |
^ ''editor_parameters'' | Parameters for diagrams.net editor|
^ ''viewer_parameters'' | Parameters for diagrams.net viewer|
^ ''external_url'' | URL to external diagrams.net application|
^ ''file_match_suffix'' | The plugin will grab and render any file containing this in its name|
^ ''enable_attic'' | Enable file revisions for diagram files|
=== Change Log ===
{{rss>https://github.com/todag/dokuwiki-plugin-diagramsnet/commits/master.atom date count=10}}
=== Known Bugs and Issues ===
//[this section might not be needed in case of external bug manager, or use RSS feed]//
=== ToDo/Wish List ===
* The diagrams.net app includes the hostname and user agent in the XML data. This should be removed or anonymized.