ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.59k stars 335 forks source link

Images not being pasted correctly #1382

Open styllig opened 1 year ago

styllig commented 1 year ago

Hi,

I have been in touch with the support guys at Kendo. The issue is that when copying a pasting an image from Outlook, images are not pasted. For some reason, the editor uses the file path to the image instead of the base64 string (see below image)

image

They suggested getting in touch to see if there is a work around for this?

Thanks!

George

marijnh commented 1 year ago

Can you show me the HTML or files that are on the clipboard when such a paste happens? Does it use the data URL when you paste into a plain contentEditable element?

styllig commented 1 year ago

Hi,

I have attached a sample e-mail that is causing the issue.

One of our users highlights the table, right clicks, copy & then pastes.

Thanks!

George

From: Marijn Haverbeke @.> Sent: Wednesday, May 31, 2023 2:46 PM To: ProseMirror/prosemirror @.> Cc: George Stylli @.>; Author @.> Subject: Re: [ProseMirror/prosemirror] Images not being pasted correctly (Issue #1382)

Can you show me the HTML or files that are on the clipboard when such a paste happens? Does it use the data URL when you paste into a plain contentEditable element?

- Reply to this email directly, view it on GitHubhttps://github.com/ProseMirror/prosemirror/issues/1382#issuecomment-1570269702, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2MM7W3BDPDYPGFE52JBAT3XI5DSNANCNFSM6AAAAAAYVO2O7Y. You are receiving this because you authored the thread.Message ID: @.**@.>>

marijnh commented 1 year ago

By "attached a sample e-mail" do you mean that bit of text you pasted below your reply? I don't think that is going to help reproduce this.

styllig commented 1 year ago

Hi,

No, I attached an .msg file to the reply. I have attached it again.

It looks like this;

Account Name Policy Period New/Renewal? 2022 Participation and Structure

2023 Participation and Structure . Reason for Opportunity

Overview

Exposure @.*** Losses

Wording

Underwriting Notes

Questions

Thanks

George

From: Marijn Haverbeke @.> Sent: Wednesday, May 31, 2023 3:29 PM To: ProseMirror/prosemirror @.> Cc: George Stylli @.>; Author @.> Subject: Re: [ProseMirror/prosemirror] Images not being pasted correctly (Issue #1382)

By "attached a sample e-mail" do you mean that bit of text you pasted below your reply? I don't think that is going to help reproduce this.

- Reply to this email directly, view it on GitHubhttps://github.com/ProseMirror/prosemirror/issues/1382#issuecomment-1570348010, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A2MM7W5JEB7PE5ZMMU36YXDXI5IQ5ANCNFSM6AAAAAAYVO2O7Y. You are receiving this because you authored the thread.Message ID: @.**@.>>

marijnh commented 1 year ago

This is a github issue. If you are replying via email, your attachments are not visible to others in the actual issue (https://github.com/ProseMirror/prosemirror/issues/1382)

styllig commented 1 year ago

Example.zip

I have attached the msg.

Cheers

George

marijnh commented 1 year ago

That is not a file format I can open, sorry.

styllig commented 1 year ago

You can't open the msg?

styllig commented 1 year ago

Example.zip

I have created a HTML file.

Hope this works for you.

Cheers

George

marijnh commented 1 year ago

That has an image pointing to "Example_files/image001.jpg". If the HTML pasted into ProseMirror has the images like that, there is no way at all for ProseMirror to convert them to data: URLs.

christopherreay commented 1 year ago

May I just comment here, sorry if its intrusive.

@styllig I think what is meant here is this: The email client has the image file on the hard drive of your user's machine. ProseMirror is running on the web. If your user wants to paste the image into a ProseMirror content, they have to upload it to dropbox or something, and get a link to the image from there