Highlight a word in radeditor

2 posts, 0 answers
  1. Sumit
    Sumit avatar
    5 posts
    Member since:
    Jun 2013

    Posted 01 Jul 2013 Link to this post

    Hi,

    i want to hightlight the Content of Radeditor on click of a
    GridButtonColumn
    
    i want to highlight the word which is present in grid. on GridButton Click
    
    
  2. Nikolay
    Admin
    Nikolay avatar
    89 posts

    Posted 03 Jul 2013 Link to this post

    Hi,

    To select any text in the RadEditor's content area, you can use the RadEditor's Client-Side API and DOM Range.

    Another approach is to fire the RadEditor's SelectAll command if you like to select all text.
    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad">
        <Content>
            <p>some text</p>
        </Content>
    </telerik:RadEditor>
     
    <script type="text/javascript">
        function OnClientLoad(editor, args)
        {
            setTimeout(function ()
            {
                editor.fire("SelectAll");
            }, 0)
        }
    </script>


    If the solution above does not help, could you open a support ticket and provide a sample project, so we could examine it and I hope provide a solution.

    Regards,
    Nikolay
    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