If there is no selection, you get the current cursor position, and zero. The value is number of characters from the start of the text, so it is simple to work out what characters are before the cursor!<br />
If there is no selection, I will get the current cursor position, and characters before cursor is zero,won't I??
I don't understand.
Sr for my bad English.
Thx for relying me.
Sincerely.