ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Handle notification about file formats that can't be pasted from Word (using the Paste as image option)

Open Mgsy opened this issue 2 years ago • 5 comments

📝 Provide detailed reproduction steps (if any)

  1. Open a new Word document.
  2. Type something.
  3. Select all and copy.
  4. Open another Word document.
  5. Choose the Paste as image option.
  6. Select all.
  7. 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

Sample document


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

Mgsy avatar Apr 28 '23 07:04 Mgsy

Maybe rel #15758

Witoso avatar Feb 05 '24 09:02 Witoso

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

image

CKEditor 4

image

illia-stv avatar Feb 07 '24 16:02 illia-stv

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.

illia-stv avatar Feb 07 '24 16:02 illia-stv

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"

Witoso avatar Feb 08 '24 09:02 Witoso

Actually, when you select only the image (EMF format), it pastes properly. The problem is only when you select all in Word before copying.

FilipTokarski avatar Jul 08 '24 11:07 FilipTokarski

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.

amitj-ap avatar Sep 23 '24 05:09 amitj-ap