Update textEditor.js

add new line in middle of text instead of appending at the end of the textarea