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 cannot 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 initially published by a user here!)