This is a migrated thread and some comments may be shown as answers.
Editor copy/paste behavior
1 Answer 10 Views
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 1
Fit2Page asked on 07 Mar 2019, 01:14 PM

Hi,

 

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.

Marc

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 08 Mar 2019, 08:58 AM
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,

Rumen
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.
Asked by
Fit2Page
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or