Hi,
Could someone tell me how can I get the caret position (in Firefox) with
the CKeditor API ?
In my plugin I tried:
but the start variable desperatly remains "undefined".
Is there any methode, trick, to do this simple thing ?
Thanks.
Could someone tell me how can I get the caret position (in Firefox) with
the CKeditor API ?
In my plugin I tried:
var editor = this; var start = editor.element.selectionStart;
but the start variable desperatly remains "undefined".
Is there any methode, trick, to do this simple thing ?
Thanks.
Re: Get the caret position ?
Is there nobody to reply on that forum ?????
C'mon, retrieves caret position is such a trivial stuff, I can't
believe no one has an answer.
Re: Get the caret position ?
editor.getSelection();
Hope this helps.
/bob
Re: Get the caret position ?
Thanks Bob for that response.
I've already tried the getSelection method, but it doesn't
bring any utilitie in retrieving caret position:
I just get an information about the selection type.
Here,s a snippet code I found on the net:
This code works in pure Javascript, I can get the caret position.
But I can't use it in CKeditor API.
What's the pb ?
Re: Get the caret position ?
You were right.
I can get the start and end of the selection (startOffset and endOffset attributs)
with the following:
Thanks again.
Re: Get the caret position ?
cursr position
hey
Acctually i want the exact cursor position but all above function not returning me that.
I want to replace the whole content with with some changes so any body please help me.
I tried startOffset bt that is not sufficient.
i need a replacement for selectionStrart in jquery