Wiki-Quellcode von Drawio Macro
Version 1.1 von xwikiadmin am 2023/04/25 10:54
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
1 | {{include reference="Confluence.Macros.DiagramMacros" /}} | ||
2 | |||
3 | {{velocity}} | ||
4 | #checkDiagramAppInstall() | ||
5 | {{/velocity}} | ||
6 | |||
7 | = Description = | ||
8 | |||
9 | The Drawio macro is a bridge between Drawio macro used in Confluence and the [[Diagram>>https://extensions.xwiki.org/xwiki/bin/view/Extension/Diagram%20Application]] macro used in XWiki. The aim of this macro is to allow users to view and also to modify the Drawio/Diagrams.net diagrams migrated from Confluence. By default, the macro displays the preview of the Drawio diagram. The user can create the editable version of the diagram, by using its representation into an XWiki diagram, always having the option to go back to the preview of the original diagram. | ||
10 | |||
11 | = Parameters = | ||
12 | |||
13 | |=Parameter|=Description | ||
14 | |**diagramName**|The diagram identifier. It should be the **name of the attachment** storing the Drawio diagram data. The Drawio diagram exports consist in attachments added to the parent page. For example, for a diagram called //MyDrawioDiagram.drawio//, there will be two attachments on the parent page: //MyDrawioDiagram.drawio.png// (the filename with a ".png" extension) representing the preview of the diagram and //MyDrawioDiagram.drawio// representing the diagram data in Diagrams.net's native format. | ||
15 | |||
16 | {{info}} | ||
17 | Besides the **diagramName** parameter, the ~{~{drawio}} macro used in Confluence has other parameters that don't have to be cleaned, because these parameters are being ignored by this bridge macro. | ||
18 | {{/info}} | ||
19 | |||
20 | = Example of usage = | ||
21 | |||
22 | The syntax of the macro using the diagram called "MyDrawioDiagram.drawio" is the following: | ||
23 | |||
24 | {{code}} | ||
25 | {{drawio diagramName="MyDrawioDiagram.drawio" /}} | ||
26 | {{/code}} | ||
27 | |||
28 | The result is the following: | ||
29 | |||
30 | {{drawio diagramName="MyDrawioDiagram.drawio" /}} |