Update textEditor.js

Change caret position