CKeditor: Copy Paste Image Problem

Hello All,

I’ve started seeing some strange copy paste behaviour with images of late when in the CKeditor. If I copy an image from a Word doc I get the bellow but no image, just a placeholder.

(% tabindex="-1" contenteditable="false" %)[[image:file:///C:/Users/hgfdh0/AppData/Local/Temp/msohtmlclip1/01/clip_image002.png||width="601" height="426" data-widget="image"]](% style="background:url(~"https://1XX.XX.X.XX/webjars/wiki%3Axwiki/application-ckeditor-webjar/1.33/plugins/widget/images/handle.png~") rgba(220, 220, 220, 0.5); display:block; left:0px; top:-15px" %)[[image:data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==||width="15" height="15" title="Click and drag to move" role="presentation" draggable="true"]](% title="Click and drag to resize" %) ​

Note that the above code also breaks the page. i.e. I can no longer toggle between source and WYSIWYG.

If I convert the Word document to PDF and then paste from the PDF, this problem goes away.

I’m using XWiki 9.5.1 with the latest CKeditor Integration v1.33. Is anyone else experiencing the same problem?

I’ve just tested this in my XWiki 11.2 instance and get the same behaviour.

Hi Ben,

I asked two colleagues that use Windows (and thus have Word) to test and they couldn’t reproduce. One of them said:

I tested and it works for me (I tested XWiki 11.3 with CKEditor 1.33 and XWiki 11.2 with CKEditor 1.32) on Chrome 74, Firefox 66 and Edge 18; I copied images both from doc and docx and it worked (I even tried with an image that has 6MB).

Do you reproduce the issue with any doc file and with any image? If you have an example doc file that you can share then you should report an issue on Loading... and attach it. Note that I assume the problem is when you copy from Microsoft Word. Did you try to copy from LibreOffice? (if you have access to a Linux machine).


Thanks Marius,

I’ll dig deeper, try some other browsers and report back.