Added escapejs to templates, changed textarea to htmleditor