This is an ultimate Open Source method (L. Kocbach). Unfortunately it does not completely preserve all the code - see below. ( But also some spaces disappear somehow ) The simple idea of HTML + Javascript interpreter is originally by Richard Bowles http://richardbowles.tripod.com/edres/editor.htm
function restore_the_code() { var ScriptInput = myInputWindow.theInsertedText.value; ScriptInput = ScriptInput.replace(/EXECUTEJAVASCRIPT /, "EXECUTEJAVASCRIPT-->"); ScriptInput = ScriptInput.replace(/ JAVASCRIPTREMOVE/g, "<--JAVASCRIPTREMOVE"); myInputWindow.theInsertedText.value=ScriptInput; }