This is a migrated thread and some comments may be shown as answers.

Set Cursor Position in Editor

3 Answers 212 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 05 May 2009, 12:17 PM
hi

i am using rad editor (version  Q1) . i want to set cursor position to the last character. when the page post back it goes on the top .

Regards

Rahul


3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 May 2009, 01:34 PM
Hello Rahul Khinvasara,

Refer the following forums links which discusses similar scenario (by using the underlying API of the browser). I hope these will be helpful to you.
Setting Focus to end of Content in Editor
Set Cursor Position

Thanks,
Shinu.
0
Rahul Khinvasara
Top achievements
Rank 1
answered on 11 May 2009, 12:28 PM
hi

i Referred  the code which you have suggested. but problem is not solved.

is there any  Editor  event to set cursor position. i want to set focus  after  last character of editor text . because scroll is still at the top.

please give me the solution ASAP.

Regards



0
sculver
Top achievements
Rank 1
answered on 25 Feb 2010, 10:50 PM
Has anyone found a solution to this.

I'm trying to set the cursor to the end of the content, but if the content is scrolling, the scroll bar will stay at the top and not scroll.

I'm using the scripts suggested in another post, as follows:
    editor.setFocus(); 
    var doc = editor.get_document(); 
    doc.execCommand("SelectAll"nullfalse); 
    editor.getSelection().collapse(); 

But I can't seem to find a solution for the scrolling.  (I saw a post saying to scroll to the top to put true in the collapse, but that didn't do anything for me).  I am running this in Chrome.
Tags
Editor
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Rahul Khinvasara
Top achievements
Rank 1
sculver
Top achievements
Rank 1
Share this question
or