T
torch
I have trawled the internet for a solution to this one . All I need is the
caret position as a number. I have seen quite a few text insertion functions
that do something like this :
textarea.caretPos = document.selection.createRange().duplicate()
and then operate on the caretPos object - but all these solutions seem to
work by creating a selected area in the text and then replacing it - I just
want the caret position as a number.
Anyone got any clues?
Thanks
caret position as a number. I have seen quite a few text insertion functions
that do something like this :
textarea.caretPos = document.selection.createRange().duplicate()
and then operate on the caretPos object - but all these solutions seem to
work by creating a selected area in the text and then replacing it - I just
want the caret position as a number.
Anyone got any clues?
Thanks