ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.66k stars 3.71k forks source link

Paste image from Word doesn't work if copied with text #17303

Open Mgsy opened 1 month ago

Mgsy commented 1 month ago

📝 Provide detailed reproduction steps (if any)

After copy/paste the provided document - Fetch examples.docx - the image is not pasted and the error is thrown:

Not allowed to load local resource: file:///Users/mgsy/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_image002.png

Clipboard data: https://gist.github.com/Mgsy/b25308f1dfee5728cb761bb32ab31717 It pastes properly if we copy only the image.

Might be related: https://github.com/ckeditor/ckeditor5/issues/16765


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

Reinmar commented 1 month ago

There's no image in the clipboard data and it doesn't work in Tiny either, so it may not be fixable.

Reinmar commented 1 month ago

It doesn't also work via IFW, so there's a chance it's not an actual image, but a shape.

rogozind commented 1 month ago

So clipboard has a reference to the image file. But the reference is a path to the local file and browser cannot read it. I tested on Gmail, Outlook web and Word web and they all cannot paste this. But desktop apps can.

Word web does tell you it fails to load the image:

Image

I think this is a limitation and it cannot be fixed. But having a warning just like Word web would be nice.