Why there is no such extension exist aleady ?
I just begin to read developer guides, but I think it will be easy to write a marco, which insert a iframe which contain draw.io page, and get back the diagram as text data and store it in page.
Do you guys have a different idea on this ?
I know there is already a diagram application, but that one seems pack draw.io as webjar, for me it’s a bit werid as draw.io can be used in embemd mode, don’t know why ?
@vmassol sorry for late reply, thanks for your response.
can you help on my first try to implement a macro ?
{{velocity}}
#if($xcontext.action == 'edit')
{{html}}
<iframe src="http://172.31.25.15:8280/?embed=1&protocol=json" />
{{/html}}
#else
{{html}}
<img src="data:image/png;base64," />
{{/html}}
#end
{{/velocity}}
my first problem is when editing a page in WYSISWYG editor, the $xcontext.action is always equal to ‘view’, so I can’t embed a iframe to let user create diagram with external draw.io.
my second problem is I have no idea how to set content at client side using javascript, when the draw.io iframe finished I cant get back the diagram data as text, but how to update it back to server side as macro’s content ?
please help.