Last Updated: 19 Aug 2019 09:44 by ADMIN
Created on: 12 Aug 2019 13:45
Category: Kendo UI for jQuery
Type: Feature Request
Issue with Copy Paste from Word when paste includes images.

We recently raised a ticket: 1424874.

We would like to request this ability to be added as a feature.

An error is thrown in the browser's console when pasting text + image from Word into the Kendo UI Editor: "Not allowed to load local resource: file:///C:/Users/..."

This is due to the inability of the browser to access the image file, located on the client machine.

The explanation of the above is the following. If you test the following sample (note, that it does not use Kendo) in Chrome, and try to paste text + image in the â€‹contenteditable <div>, you will observe the same error. The Editor also renders its content in an editable div element. The browser does not recognize that the user attempts to paste an image. Instead of reading the image data and loading it as a base64 string to the src attribute of the <img> element it generates an <img> tag which points to the clipboard location of the file on the client machine. As the browser is not allowed to access such resource, it trows the error observed and the image is not rendered.

To resolve this issue, when pasting only an image (no text), the Editor has its own internal implementation. Therefore, the user is able to paste images (e.g. clicking on the image in Word->Ctrl +C->then Ctrl + V in the Editor). However, when pasting it together with text, the widget does recognize the text and does not apply the custom processing aimed to convert the image. Therefore the native browser behavior of pasting images is exhibited.


1 comment
Ivan Danchev
Posted on: 19 Aug 2019 09:44
Hello Shane,

Thank you for submitting this Editor feature request. We will monitor the community's interest in it and consider implementing it in a future release.

Ivan Danchev
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.