Moved editor instance to script.js

This is because the editor instance is really important to manipulate
changes in the editor.

I have also added the predefined settings what the Enter key can do.
Now, it's defaulted to creating a linebreak. Which makes it less choppy.