Handle notification about file formats that can't be pasted from Word (using the Paste as image option)
📝 Provide detailed reproduction steps (if any)
- Open a new Word document.
- Type something.
- Select all and copy.
- Open another Word document.
- Choose the Paste as image option.
- Select all.
- Paste to the editor.
✔️ Expected result
The image is pasted.
❌ Actual result
The image is not pasted and there is the error in the console.
t allowed to load local resource: file:///Users/kacper/Library/Group%20Containers/UBF8T346G9.Office/TemporaryItems/msohtmlclip/clip_image002.png
📃 Other details
Clipboard data
- HTML - https://gist.github.com/Mgsy/18421143e0924f5937a26e852b4111f6
- RTF - https://gist.github.com/Mgsy/763fa66fccc54c7f9d330df27991961b
Sample document
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
Maybe rel #15758
Unfortunately Word uses emf file format for "paste with picture" option which is not supported in modern browsers. I have checked another popular editors like CKEditor 4 or Tiny MCE there is also impossible to paste that.
Tiny MCE
CKEditor 4
Maybe rel #15758
It's no related, because there are no pictures with emf format, then my assumption is, problem could be related to something else.
To all watching, this is a "can't fix" category on our side, I'm changing the ticket to some better notification about an invalid file format.
Goal: the text in the editor shows "Unsupported file type"
Actually, when you select only the image (EMF format), it pastes properly. The problem is only when you select all in Word before copying.
When we insert a .emz image in MS Word 2013, copy it, and paste it into CKEditor 5, the image displays correctly. However, if the .emz file is inserted with text in MS Word 2013, and then copied along with the text and pasted into CKEditor 5, only the text appears; the image does not display.
@f1ames @tista-chatterjee, please help the issue fix.