enjoysmath/quiver-bee

"Save" button needs special handling because we embedded quiver as an iframe

Opened this issue · 0 comments

See https://q.uiver.app to see how saving works. 1. Edit the diagram, add some objects / arrows. 2. Click save and watch the URL in the address bar change.

This works by encoding a JSON-string description of the diagram into standard base64 encoding. The base64 is then what you see after the ?q= in the URL. This is how users can paste the diagrams URL anywhere on the web, and when another person clicks on it, it will load the data from the URL starting out, instead of the default/blank diagram.

But we have currently quiver's index.html embedded as an iframe into our index.html, so the URL is changing as it should in the iframe, but we have to bring it up to the parent window's URL. And conversely, bring the parent window's URL into the iframe's, namely the base64 part.

If this does not work, ie. we can't figure out how to do it, then we'll have to for-go embedding as iframe and instead just massage the code in quiver's index.html until it plays well with bootstrap studio. I think though that the above should work based upon my experiments so far in JS.

That is why the save button requires special handling and not just copying code from existing user click actions in /src/ui.js.