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

Setting Focus to end of Content in Editor

1 Answer 113 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Angelo Babudro
Top achievements
Rank 1
Angelo Babudro asked on 25 Nov 2008, 08:22 PM
I have implemented the javascript to set the focus to the content area of the radeditor (latest release/build). However the cursor gets inserted at the very first position. so if there is text preloaded in the editor the cursor is before the text and the user cannot simply start typing with re-positioning the cursor. Is there a way to get the cursor to go to the end of any content when setting the focus?

1 Answer, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 28 Nov 2008, 01:26 PM
Hi Angelo Babudro,

The requested feature is not supported out-of-the box by RadEditor and it does not offer client-side API for it.

That is why you should implement the delete detect feature yourself by using the underlying API of the browser. For the you need to get a reference to the RadEditor Document with editor.get_Document(); and create a text range.

After that you will be able to use the following methods

move(), moveStart(), moveEnd() and select()
which will allow you to control the selection
.

Kind regards,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Angelo Babudro
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Share this question
or