Embedding into Microsoft SharePoint

Hi there,

I have just tried to embed my first Anvil app into a Modern Microsoft SharePoint Online site.
I have pasted in the following code:

<script src="https://anvil.works/embed.js" async></script>
<iframe style="width:100%;" data-anvil-embed src="https://4JXBM6O3YJNKULAE.anvil.app/2I5OI5C7P3B3OOK4UJLN67NS"></iframe>

SharePoint throws back an error:
“We can’t show this embedded content because the code seems to be incomplete. Make sure that the embed code includes width, height and a valid address for the src attribute.”

Does anyone have an idea why it doesn’t like the code? I suppose it is because of the Script tag?

Nice greetings,
Henning


edited to put HTML in back ticks

Welcome to Anvil, @henning.bahr.

We don’t see any code after

Perhaps you could try this: place 3 backticks (`), on a line by themselves, before and after your (html?) code. Then we should be able to see it.

2 Likes