Update ScriptBox to use JS method for CodeMirror

* Previous implementation was broken with new move_to_element additions.
* Pure JS implementation is faster.
Merge pull request #904 from psav/fix_script_box

Update ScriptBox to use JS method for CodeMirror