removed the scripts inside the views/editor.html and put inside its own js file