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

Editor: UnorderedList Selected by default

1 Answer 45 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Freddy
Top achievements
Rank 1
Freddy asked on 05 Jul 2013, 02:16 PM
Hi, 
I'm using the Editor in one of the pages, and I'd like that onload the InsertUnOrderedList selected by default so when they click inside the editor they're already typing in bulletpoints

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 09 Jul 2013, 01:05 PM
Hello Freddy,

You could use this sample code to customize it further for your needs:
<telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="SelectList">
</telerik:RadEditor>
<script>
  function SelectList(editor, args) {
    setTimeout(function () {
    editor.fire("InsertUnorderedList")
    }, 0);
  }
</script>
 
What it does is to simulate a click on the insert list button from the editor's toolbar by using the control's client-side API. It uses the OnClientLoad event of the editor that is fired once it is fully instantiated.

Regards,
Ianko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Editor
Asked by
Freddy
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or