react-drawio icon indicating copy to clipboard operation
react-drawio copied to clipboard

Export Plain XML on Save

Open ibraheem-111 opened this issue 1 year ago • 2 comments

We are using this library to be able to edit save drawio applications inside our application, and we need to store the actual XML of the diagram file in the database as we are also using the diagram in upstream tasks. However, the export event only allows xmlpng or xmlsvg to be exported.

ibraheem-111 avatar Oct 21 '24 14:10 ibraheem-111

For our project also we need the plain xml

krishnan-mk-3 avatar Apr 09 '25 05:04 krishnan-mk-3

Hi both,

If you have a look at the console when opening https://marcveens.github.io/react-drawio/?path=/story/components-drawioembed--export-data-svg for example, you see that the onExport callback also returns the XML already. Does that help?

marcveens avatar Apr 09 '25 08:04 marcveens