I'm using SCEditor along jQuery in my website and I wonder how can I get the current caret position relative to the beginning of the textarea/div?
I tried things like:
$J('#textarea').sceditor('instance').getRangeHelper().selectedRange().startOffset
but that only gives me the position relative to the current DOM object, not the entire textarea.
What I'm trying to accomplish is to remove all the text after the caret from the textarea. Maybe there is another way to do that.
Thanks,