implement getCaretPosition
Merge pull request #263 from mykmelez/texteditor-plus

implement getCaretPosition