I'm having a problem getting Internet Explorer 11 to fire the paste event when I paste an image to a contenteditable div.

I've got a .html file with javascript and html inside a Sharepoint Online Wiki page. On this page, I have a drag/drop div which acts as a receiver for images that are dropped onto it (works fine in all browsers).

I've also go a hidden contenteditable div on the page that always has focus. Anytime a "paste" event is fired, the data on the clipboard is placed into this div, then I do some checking to see if the clipboard data is available with the event (Chrome) or via base64 info in the div itself (Firefox).

This works great with Chrome and Firefox.

I cannot get it to work with IE. The paste event WILL fire if I put in plain text...but it WILL NOT fire if I paste in an image. It does nothing.

To test it, I took all the code outside of sharepoint and just ran it locally. The paste event DID FIRE when running outside of Sharepoint and the expected Base64 image data was pasted to the div.

Is sharepoint causing some kind of issue that's not allowing me to paste base64 image information to a contenteditable div on IE 11?

Please help...I've been running circles on this one for several days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.