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

Delete   StripFormattingOnPaste

1 Answer 38 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lorenzo Margola
Top achievements
Rank 1
Lorenzo Margola asked on 24 Jun 2013, 05:13 PM
Hi guys
I have an issue with StripFormattingOnPaste functionality.
Setting StripFormattingOnPaste = AllExceptNewLine when paste html content with   tag inside these tag are not removed.

If I use "Past plain text button" all tag   are removed.

StripFormattingOnPaste = AllExceptNewLine and "Past plain text button" have different results, it is possible to set "Past plain text" as default behavior when paste content?

Is possible delete   when past content? 

For testing I have used this page 
Thanks.

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 26 Jun 2013, 02:04 PM
Hello Lorenzo,

The behavior you encounter is normal and the differences between the two functionalities are expected because they are designed for different purposes. The functionality you want can be achieved by customizing the RadEditor via the client-side event handler OnClientPasteHtml. This is done by attaching a method to this handler which is using regular expressions for replacing the   with empty literal.

I am sending you an example project that demonstrates the described functionality. You can follow it for your project and customize it further to reach your expectations.
 
Regards,
Ianko
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
Lorenzo Margola
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or