Closed cedricbraekevelt closed 6 months ago
Thanks for using this library! Of course I'm willing to assist. As far as I see you're almost there. Did you try this as your return statement?
<DrawIoEmbed
xml={fileContent}
urlParameters={{
spin: true,
libraries: false,
noSaveBtn: true,
noExitBtn: true,
}}
/>;
Please also be aware that excalidraw and draw.io are 2 different products, so that will also cause some issues here.
Let me know if more help is needed
Hi Marc,
Thanks for answering, of course, the .excalidraw had to be changed to .drawio 😄 However I also had to change the .json in my fetching function to .text as drawio uses xml instead of json.
Now I got it embedded, thanks for the help and the awesome product! 😃
Hi Marc,
Thanks for the great library, however I'm quite a starter in react. (not really my strong suit). I was curious how if I can seed the data from a variable (in my case fileContent). I have used the following code working before to load the content of a file, but I don't know how to insert this value into the DrawIOEmbed element.
Any possibility you're able to assist? :)
Regards, Cédric