Skip to content

Setting non-default baseUrl breaks iFrame messaging #55

@MacWatrous

Description

@MacWatrous

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:

  1. Go to https://marcveens.github.io/react-drawio/?path=/story/components-drawioembed--new-canvas
  2. Change baseUrl to https://jgraph.github.io/drawio/src/main/webapp/index.html (or https://jgraph.github.io/drawio/src/main/webapp), the GitHub pages hosted version as mentioned here
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions