Set Cursor Position in Editor

4 posts, 0 answers
  1. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 05 May 2009 Link to this post

    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


  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 May 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 11 May 2009 Link to this post

    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



  5. sculver
    sculver avatar
    11 posts
    Member since:
    Aug 2009

    Posted 25 Feb 2010 Link to this post

    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.
Back to Top