How to import draw.io (XML) diagram into the existing confluence page

Hi,

we are using the draw.io confluence plug in for our wiki, and we are finishing our own (XML draw.io) network templates, which we wanna embed into the existing confluence page. The problem is, we don't know how to do that, as the simple attach call (API) will not work.

 

Thanks,

Stan

 

5 answers

Where do you store the template diagrams?

Hi Boris,

thanks for you prompt answer, we don't store them, we generate the XML programmatically, based on the template, and want to add them in forms of draw.io diagram to the existing wiki page. So how we can do that via API ad draw.io plug in is engaged?

You can import diagrams from diagram editor.

First you add draw.io macro to the page, then click 'Edit' to launch the diagram editor.

From there you go File -> Import.

The XML you are importing needs to be a draw.io diagram.

 

yes, I've tested this one and works fine, but we need to exactly do that (File -> import...) programmatically as we have hundred of pages where the diagrams need to be automatically populated.

That would be tricky. Xml attachment is one part of the story. Png is the second. Each time you save a diagram a png is generated which is displayed in the page editor.

Aside from adding attachments through rest calls, you would also need to add the macros to pages. Both can be done programmatically but you would need to make your own plugin to do that.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted yesterday in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

59 views 2 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you