Closed sabinayakc closed 6 months ago
Need to handle this one as well. Maybe you might have a better idea?
Hi @sabinayakc,
Thanks for your PR and sorry for not responding sooner. Good addition!
In regards to your question, since you already have the baseUrl
available in the DrawIoEmbed
component, you can also pass it to handleEvent
on line 38 as an extra argument. Then the line you provided can become something like if (!event.origin.includes('embed.diagrams.net') && !event.origin.includes(baseUrl)) {
.
Done!
Awesome, looks good, thanks for your contribution!
Hey thanks for the repo first of all.
I was needing a react iframe like component and stumbled upon your repo.
However, I use a self hosted instance of draw.io and so was wanting to provide my own url.
This PR should allow that.
Let me know.
Thanks again.