Khan Academy has a button for sharing your CS project or program underneath the coding window.
Pressing the button works, but the resulting Share link and code to Embed your project on your own website sometimes fails to be copied.
This is a known error that occurs in the Firefox browser.
Known workaround: Switch browsers. The functionality works in Chrome and may work in other browsers. (This workaround was initially published by a user here!)