Set cursor location in Editor

4 posts, 0 answers
  1. Dennis
    Dennis avatar
    6 posts
    Member since:
    Oct 2014

    Posted 25 Jun 2015 Link to this post

    I'm trying to set the location of the cursor to the end of the text in my editor.

     Please let me know how I can achieve this goal.

     

    Dennis

  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 29 Jun 2015 Link to this post

    Hello Dennis,

    See the help topic on how to use ranges to set the location of the cursor. For focusing the last node in the editor, use the last element in the editable content.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Dennis
    Dennis avatar
    6 posts
    Member since:
    Oct 2014

    Posted 30 Jun 2015 in reply to Alex Gyoshev Link to this post

    What do you mean by the last element in the editable content?
  5. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 01 Jul 2015 Link to this post

    Hello Dennis,

    This would be editor.body.lastChild, or the end of its previousSibling.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready