Editor: UnorderedList Selected by default

2 posts, 0 answers
  1. Freddy
    Freddy avatar
    3 posts
    Member since:
    Jun 2013

    Posted 05 Jul 2013 Link to this post

    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
  2. Ianko
    Admin
    Ianko avatar
    1864 posts

    Posted 09 Jul 2013 Link to this post

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