Editor copy/paste behavior

2 posts, 0 answers
  1. Fit2Page
    Fit2Page avatar
    454 posts
    Member since:
    Feb 2007

    Posted 07 Mar 2019 Link to this post



    We are experiencing some differences in the copy/paste behavior in different browsers.

    The content is copied and pasted in Design mode. See attached images.

    In FF and Edge it works as expected.

    In Chrome the HTML is altered...the color for instance is coming from a coupled stylesheet...but why?

    This is a serious problem for our CMS users.


  2. Rumen
    Rumen avatar
    14320 posts

    Posted 08 Mar 2019 Link to this post

    Hi Marc,

    The clipboard is controlled entirely by the browser and the editable iframe/div content area of RadEditor just consumes the content provided by the clipboard.

    The scenario is well explained in the following documentation article RadEditor and the Browser Clipboard.

    The available options to alter the pasted content prior it being inserted in the editor's content area are:
    • Experiment with the different StripFormattingOptions options to simplify the pasted content and deliver similar experience under the different browsers.
    • Attach to the OnClientPasteHtml event, check for the "Paste" command execution and modify the pasted content with DOM methods and regular expressions. The clipboard content is provided by the args.get_value() method. There is an example at the end of the description of this demo: OnClientPasteHtml.

    Best regards,

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top