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

Prevent <form> being pasted in Editor

1 Answer 28 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lenny_shp
Top achievements
Rank 2
Lenny_shp asked on 18 Aug 2011, 07:36 PM
What is the recommended technique to filter out HTML paste when it contains <form> tag?    It's conflicting with the way submit is working.   The editor supports HTML paste.

http://www.telerik.com/help/aspnet-ajax/editor-onclientpastehtml.html

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 22 Aug 2011, 04:10 PM
Hi Lenny_Shp,

RadEditor does not offer a built-in functionality that strips the form elements.

You can attach to the OnClientPasteHtml event, check for the "Paste" command execution, strip the form tags with a regular expression and paste the modified content in the editor (args.set_value(newContent);).

Best 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
Lenny_shp
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Share this question
or