Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text with images pasted from Word 2016 doesn't preserve images. #11993

Closed
jswiderski opened this issue Jun 30, 2022 · 6 comments · Fixed by #13162
Closed

Text with images pasted from Word 2016 doesn't preserve images. #11993

jswiderski opened this issue Jun 30, 2022 · 6 comments · Fixed by #13162
Assignees
Labels
package:paste-from-office resolution:resolved This issue was already resolved (e.g. by another ticket). squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@jswiderski
Copy link

📝 Provide detailed reproduction steps (if any)

  1. Got to https://ckeditor.com/docs/ckeditor5/latest/features/pasting/paste-from-word.html
  2. Extract attached file press Ctrl+A, Ctrl+C and paste its content into editor.
  3. You can also select some text with an image. It doesn't have to be the whole document
    copy_paste_image_+_text.docx.zip

✔️ Expected result

Image with text gets pasted.

❌ Actual result

Only text gets pasted.

❓ Possible solution

If you have ideas, you can list them here. Otherwise, you can delete this section.

📃 Other details

From what we have checked, this MS Word file has been created with MS Word 2016 - https://superuser.com/a/1144401

  • Browser: Any
  • OS: Any
  • First affected CKEditor version: N/A
  • Installed CKEditor plugins: paste-from-office

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

@jswiderski jswiderski added type:bug This issue reports a buggy (incorrect) behavior. package:paste-from-office support:2 An issue reported by a commercially licensed client. squad:core Issue to be handled by the Core team. labels Jun 30, 2022
@Reinmar
Copy link
Member

Reinmar commented Jun 30, 2022

Is it a regression?

Is there a workaround (e.g. converting to a different format)?

Is it perhaps related to #2493 and #11921?

@jswiderski
Copy link
Author

jswiderski commented Jun 30, 2022

Is it a regression?

I don't see it as a regression. This is rather specific to this document of that type of documents. I based that on client comments:

Don’t see a issue if we create new document.
...
Even if I copy paste contents from old word file to new one – Don’t see a issue. But Save As old documents to new doesn’t help.

--

Is there a workaround (e.g. converting to a different format)?

According to the client "Even if I copy paste contents from old word file to new one – Don’t see a issue" but this is a weak workaround as not everyone has multiple MS word versions and the online one is not yet supported.

I personally haven't found any "trick" to get this working.

--

Is it perhaps related to #2493 and #11921?

It can be related to #2493 because from what we have checked, this file has been created with MS Word 2016 as well.

@arkflpc
Copy link
Contributor

arkflpc commented Jul 5, 2022

This is the content of the pasted clipboard from attached document: old.txt
This is the one after pasting it to empty document and copying it again: new.txt

The new one encodes images as:

<!--[if gte vml 1]>... <v:shape ...><v:imagedata src="file:///Path.jpg" /></v:shape><![endif]-->
<![if !vml]><img src="file:///Path.jpg"><![endif]>

v:shape is ignored during processing, and what the paste-from-office plugin actually supports is <img>

The old format is just:

<v:shape ...><v:imagedata src="file:///Path.jpg" /></v:shape>

@martynawierzbicka martynawierzbicka added type:feature This issue reports a feature request (an idea for a new functionality or a missing option). and removed type:bug This issue reports a buggy (incorrect) behavior. labels Jul 6, 2022
@nileshawtade
Copy link

@mdabkowska88 - Any update on this ?

@Reinmar
Copy link
Member

Reinmar commented Nov 16, 2022

@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Nov 30, 2022
@arkflpc arkflpc self-assigned this Dec 6, 2022
@CKEditorBot CKEditorBot added status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. and removed status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. labels Dec 6, 2022
niegowski added a commit that referenced this issue Jan 3, 2023
Fix (paste-from-office): Fixes pasting images from MS Word 2016. Closes #11993.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Jan 3, 2023
@CKEditorBot CKEditorBot added this to the iteration 60 milestone Jan 3, 2023
@mabryl mabryl added the resolution:resolved This issue was already resolved (e.g. by another ticket). label Mar 8, 2023
@mabryl
Copy link
Contributor

mabryl commented Mar 8, 2023

Closed as mentioned in #2493 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:paste-from-office resolution:resolved This issue was already resolved (e.g. by another ticket). squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants