ckeditor / ckeditor4

The best enterprise-grade WYSIWYG editor. Fully customizable with countless features and plugins.
https://ckeditor.com/ckeditor-4
Other
5.78k stars 2.46k forks source link

PasteFromWord Can't Copy/Paste images + other content from Word (most browsers) #5489

Closed MicahBrown closed 1 year ago

MicahBrown commented 1 year ago

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Take a word document with at least some text and an image (or just a doc with 2 images)
  2. Then select the whole document (Ctrl+A)
  3. Then paste in the editor (Ctrl+P) It's currently broken on the plugin demo page
  4. The images show broken like so: brave

I noticed this behavior on Chrome/Brave, Firefox. But weirdly, it works fine on Safari.

Expected result

The images should copy fine, like they do in Safari: safari

Actual result

Images copy broken like the example in step 4 above.

Other details

Sidenote: It looks as if the images also don't copy over in the appropriate order as you can see from my gifs.

KarolDawidziuk commented 1 year ago

Hi @MicahBrown

Could you provide a .docx file with images that are not possible to paste? Currently, I am not able to reproduce this issue, and copying and pasting two images from Word to the editor works well.

MicahBrown commented 1 year ago

@KarolDawidziuk Sure, this doc doesn't work for me: example.docx

MicahBrown commented 1 year ago

Also, we initially got this report on this issue from some end-users. So it doesn't seem isolated to my environment.

MicahBrown commented 1 year ago

And one more thing, copying one image at a time still does work. It just seems to be when you copy an image with text or other content.

KarolDawidziuk commented 1 year ago

It does not work because the image format is not supported. These images are in image/emf format. In addition, if you check the browser's console you'll see an appropriate error regarding this.

KarolDawidziuk commented 1 year ago

Since a feature request for EMF file support already exists. I am closing this issue.

MicahBrown commented 1 year ago

@KarolDawidziuk Ah, makes sense. I appreciate the insight!