htmleditor.js cleanup