Setting non-default baseUrl breaks iFrame messaging
Hello, thank you for this very helpful package!
Unfortunately we are having some trouble getting the baseUrl parameter to work. We need to fork Draw.io to add a quick snippet to one of the pages but we can't seem to be able to load it if it's hosted anywhere but https://embed.diagrams.net.
Essentially I believe the issue is that the message channel with the iFrame is not working as handlers like "onLoad" or "onConfigure" never fire.
Basic example:
- Go to https://marcveens.github.io/react-drawio/?path=/story/components-drawioembed--new-canvas
- Change baseUrl to
https://jgraph.github.io/drawio/src/main/webapp/index.html(orhttps://jgraph.github.io/drawio/src/main/webapp), the GitHub pages hosted version as mentioned here - Note how the diagram editor never finishes loading
Please let me know if I'm missing something here, otherwise I'm not sure how to make this work no matter the hosting method.
Hi @MacWatrous,
I just published a fix for this issue in version 1.0.6. Could you have a look if it works for you now?