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

[Solved] Contents in script tags are not removed for RadEditor Text

1 Answer 164 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Terry lin
Top achievements
Rank 1
Terry lin asked on 27 Aug 2009, 09:22 AM
Enter a script block in an editor, and try to get the text of the editor, the script tags of the script block are stripped, but the codes in the tags are still there. Does someone know how to remove the whole block? Thanks.

1 Answer, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 28 Aug 2009, 08:51 AM
Hi,

We will improve the Text property of the editor in the next official release. For now, you can try enabling the RemoveScripts filter, then re-setting the editor content to remove the scripts and finally getting the  .Text property:

RadEditor1.EnableFilter(RemoveScripts);
RadEditor1.Content = RadEditor1.Content;
string text = RadEditor1.Text;

All the best,
Lini
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Terry lin
Top achievements
Rank 1
Answers by
Lini
Telerik team
Share this question
or