marcveens / react-drawio

React component for integrating the Diagrams (draw.io) embed iframe
MIT License
43 stars 8 forks source link

About How to show preview, for the programmatically exported data #21

Closed vishwa-vbn closed 4 months ago

vishwa-vbn commented 5 months ago

For the data of whichever format there is no option mentioned , about how to show them in a preview

marcveens commented 5 months ago

Hi @vishwa-vbn, what kind of preview would you like? I mean, the diagram that was created is basically the same as the exported file. Please give a little more context so I can see if it would fit within the library. Thanks!

vishwa-vbn commented 5 months ago

Hi @vishwa-vbn, what kind of preview would you like? I mean, the diagram that was created is basically the same as the exported file. Please give a little more context so I can see if it would fit within the library. Thanks!

I am exporting the created diagram in xmlsvg format, after exporting storing that data in local storage and I want to show that exported diagram in a preview window , and for that is there any preview window package is there!! , no matter what format the data is , it must show the preview that kind of preview window package I am looking for..

Something similar to jira's confluence , in which diagram is shown in preview window in a note

marcveens commented 5 months ago

I provided an example in Storybook on how to deal with an export preview, as can be seen here: https://marcveens.github.io/react-drawio/?path=/story/components-drawioembed--export-data-svg. Code of that story here: https://github.com/marcveens/react-drawio/blob/main/stories/DiagramsEmbed.stories.tsx#L255.

How you want to show the preview is up to you, and should be implemented in your own application. Does that help?