textEditor bug fix