How to stop pop dialog from opening when paste from word is clicked in radeditor ?

1 Answer 42 Views
Editor
Vishwanatha
Top achievements
Rank 1
Vishwanatha asked on 12 Apr 2022, 07:48 AM

We do not want to show the pop up dialog when "Paste from Word" button is clicked .. Can you provide any solution ?

Please find the attached file  for  reference

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 12 Apr 2022, 12:54 PM

Hi Vishwanatha,

RadEditor shows the Paste dialog in Chrome, Edge, and Firefox when executing the Paste from Word command because these browsers restrict the clipboard manipulation via script. The scenario is discussed in the following documentation article:  Using the Built-in Clipboard Tools

In Figure 1, the Paste from Word tool is used and the content is cleaned and pasted directly into the RadEditor. In Figure 4, you can see how the tool acts when the browser restricts the clipboard manipulation—a dialog opens for the content to be pasted. After pressing the Paste button of the dialog, the content is again cleaned to a proper, readable HTML markup as in Figure 1.

Figure 1: pasting from MS Word in RadEditor

editor-pasting-diagram

Figure 4: Using Paste from Word tool when clipboard manipulation is restricted.

editor-paste-dialogs

If you want you can configure RadEditor to directly strip the content on paste via the StripFormattingOptions property as explained at Automatic On-paste Content Stripping. Another approach is to subscribe to the OnClientPasteHtrml event, check for the Paste command, and modify the clipboard content as per your project requirements.

Best Regards,
Rumen
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Editor
Asked by
Vishwanatha
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or