Search code examples
javascriptangularapisdkstackblitz

Is there any way to prevent share, fork option in Stackblitz


I need to embed Stackblitz on my site. The user can edit the document and render the output on the screen. I used Stackblitz api to embed the iframe. I cant find any document on Stackblitz.io to hide those options (share code). Can anyone help me ?

enter image description here


Solution

  • In your project you need to add forceEmbedLayout: true

    window['embedNewProject'] = () => {
      sdk.embedProject('myDiv', project, { height: 320, **forceEmbedLayout: true** });
    }