What is embedding?
If you want to share your script with others, you can do that by embedding it in your own website. This means that you can take the script that you have created and put it in your website so that others can see it and interact with it. Only public projects can be embedded in your website. There is no way to embed scripts from private projects or those who are visible to silver or gold community members. Be aware that if a project is public all assets and scripts within it are also public and easily accessible to everyone.
How to embed public scripts?
All scripts can be embedded with an iframe. If you are not familiar with iframes, they are html elements that allow you to embed other html elements in your website. For the purpose of this tutorial we will embed a script that is going to open the editor. To do that you have to add an iframe element to your website and set the src attribute to the url of the script that you want to embed.
It is important that you understand and decide for yourself which sandbox attributes to use on the ifreame. Disabling some of the attributes will make some or all of the features of the embed to stop working. We do not take any responsibility if embeds work incorrectly or if they are used in a way that is not intended. If you want to learn more about sandbox attributes, you can read about them here.
Here's the outcome of such an embed
Remember that you'll have to style the iframe yourself. You can check out this React example on our opensource app-examples github repo that uses iframes.
Here is the link to the running website with two embedded preview links
Always remember that you have agreed to our terms and conditions.