Table of Contents
diagramsnet Plugin
Compatible with DokuWiki
- 2023-04-04 "Jack Jackrum" unknown
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" yes
- 2018-04-22 "Greebo" yes
Description
This plugin integrates 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 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 Manager or follow the guide at 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
- Add .gitattributes (2021-11-11 21:11)
- Bump version in README.md (2021-11-11 21:08)
- Change saving spinKey (2021-11-11 21:04)
- Set status "modified: false" on save. New save popup. (2021-11-11 20:51)
- Tidy up (2021-11-11 20:40)
- Add option to anonymize hostname and browser agent in xml data. (2021-11-11 19:39)
- Bump diagrams.net version to 15.7.3 (2021-11-10 20:49)
- Update action.php (2021-11-10 20:34)
- Update README.me (2020-08-15 01:47)
- Remove remnants of old name (draw.io) from settings. (2020-08-12 23:30)
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.