move wysiwyg code outside editor js file