some work on htmleditor.js