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

RadEditor: Client-side Clear Selection?

1 Answer 55 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 22 Aug 2011, 06:14 PM
Greetings!

I was going through the online documentation as well as the static class library looking for a way to clear the Editor's selected area. Ideally, I would like to be able to clear the selected area during a Client-side event. Is this possible?

Thanks in advance!

-Andrew

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 23 Aug 2011, 01:31 PM
Hello Andrew,

You can try the browser's Unselect command identifier:

var editor = $find("<%=RadEditor1.ClientID%>");
editor.get_document().execCommand("Unselect", null, true);

as well as the collapse selection method:

editor.getSelection().collapse();   


Kind regards,
Rumen
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Editor
Asked by
Andrew
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or