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

Highlight a word in radeditor

1 Answer 128 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sumit
Top achievements
Rank 1
Sumit asked on 01 Jul 2013, 11:21 AM
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

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 03 Jul 2013, 03:18 PM
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.
Tags
Editor
Asked by
Sumit
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or