TextEditor implementation