Created custom widget for ckeditor textarea. Refactored js.