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

Put cursor at top?

1 Answer 49 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dan Strohschein
Top achievements
Rank 1
Dan Strohschein asked on 20 Aug 2010, 08:37 PM
I'm using the editor in DNN (Of course) and I'm trying to figure out how, once a page has loaded with text in the editor, to set the cursor at the first character in the set at the top, instead of at the bottom like it's coming up now. Is there any tips on how to set the cursor position?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 24 Aug 2010, 11:17 AM
Hi Dan,

Here is an example how to set the cursor at the beginning of the content area of the standard version of RadEditor for ASP.NET AJAX:

<script type="text/javascript">
    function OnClientLoad(editor, args) {
        setTimeout(function () {
            editor.setFocus();
        }, 100);  
    }
</script>
  
<telerik:RadEditor runat="server" id="RadEditor1" OnClientLoad="OnClientLoad">
   <Content>
        <p>test</p><p>test</p><p>test</p><p>test</p><p>test</p>
    </Content>
</telerik:RadEditor>

The information provided in the following KB article will help you to attach the above function to the OnClientLoad event of RadEditor for DNN: Executing custom code called on RadEditor's events.

Greetings,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Dan Strohschein
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or