Delete   StripFormattingOnPaste

2 posts, 0 answers
  1. Lorenzo Margola
    Lorenzo Margola avatar
    8 posts
    Member since:
    Jan 2008

    Posted 24 Jun 2013 Link to this post

    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.
  2. Ianko
    Admin
    Ianko avatar
    1895 posts

    Posted 26 Jun 2013 Link to this post

    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.
Back to Top