refactored htmleditor.js
debounced redraw on addPlugin
update