htmleditor init function cleanup