Embedding the app in itself

What I’m trying to do:
Exactly what the title says :wink:

What I’ve tried and what’s not working:
I’m using the Beta editor. I switched back to the old editor, got to “publish”, allowed embedding, copied the iFrame and script generated.
If I add the IFrame to a custom html form the following message appears:
image

Code Sample:
The HTML used was:

<center style="font-style:italic; color:#888; margin: 3em;">
  <script src="https://anvil.works/embed.js" async></script>
  <iframe style="width:100%;" data-anvil-embed src="https://[url].anvil.app/null" height="700"></iframe>
</center>

where [url] is the ID of the app.

Aditional info:
I’m using environments, so maybe it’s because of that?

When I copied the embed tags exactly as specified in the Classic Editor, it didn’t work either (even in CodePen). I think the problem is that /null in the src of the iframe tag. When I replaced the source with the private link exactly as I would put it in the Browser, it worked.

I couldn’t get the script tags to work in Rich Text, but when I put the private link as the url for an iFrame component, that worked perfectly.

2 Likes

@gabriel.duro.s thanks for letting us know about this, I’ve now moved it to Bug Reports.

For the time being, though, what @duncan_richards12 has responded is the correct workaround!

2 Likes

Thanks @duncan_richards12 and @patricia !

I saw that the suggestion worked, but I was also gonna mention that basic users wouldn’t think of trying that, so it should be moved to Bug Reports. Thanks!

1 Like