[Project_owners] Mozilla Rich-Text
belaviyo at gmail.com
Fri Jun 5 12:44:52 PDT 2009
Yes it works but I cant find how to change the cursor position!
here is a example, in this example I want to change the position of cursor
to second char, but it doesn't work
<pre id="editor1" contentEditable="true" onclick="
selection = window.getSelection();
range = selection.getRangeAt(0);
startNode = document.getElementById('editor1');
startOffset = 2;
range.setStart(startNode, startOffset );
any idea ?
also is there any function to tell me the current location of cursor ?
On Thu, May 28, 2009 at 1:50 PM, Neil <neil at parkwaycc.co.uk> wrote:
> joe ertaba wrote:
> Is there any way to find cursor position in
>> something like textbox's selectionstart, selectionend,...
> window.getSelection() works with editable areas too, assuming it has focus.
> Project_owners mailing list
> Project_owners at mozdev.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Project_owners