codesandbox-client
codesandbox-client copied to clipboard
Cannot get terminal to work in CodeSandbox embed
Hi,
I have a CodeSandbox which is a basic Express app. You can find it here: https://codesandbox.io/s/cold-butterfly-nl30s As you can see, when you visit the above URL, "Hello World!" is displayed in the preview pane and "It Works!" is logged to the terminal.
My problem is that when I embed the sandbox on our site and set the terminal to be open in the embed, nothing is logged to the terminal.
You can see the problem demonstrated here: https://www.sitepoint.com/?p=174674&preview=1&_ppp=efe3e7b8a1
"Hello World!" is displayed in the preview pane, as expected. However the terminal remains blank (I would like to see "It Works!" logged).
Here is my embed code:
<iframe src="https://codesandbox.io/embed/cold-butterfly-nl30s?codemirror=1&expanddevtools=1&fontsize=14&hidenavigation=1&moduleview=1&theme=dark"
style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
title="cold-butterfly-nl30s"
allow="geolocation; microphone; camera; midi; vr; accelerometer; gyroscope; payment; ambient-light-sensor; encrypted-media; usb"
sandbox="allow-modals allow-forms allow-popups allow-scripts allow-same-origin"
></iframe>
What am I doing wrong?