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

Copy Word table and pasting into CKE5 loses table cell background color #7275

Closed
luig0 opened this issue May 22, 2020 · 5 comments · Fixed by #7313
Closed

Copy Word table and pasting into CKE5 loses table cell background color #7275

luig0 opened this issue May 22, 2020 · 5 comments · Fixed by #7313
Assignees
Labels
type:bug This issue reports a buggy (incorrect) behavior. type:regression This issue reports a bug that was not present in the previous releases.

Comments

@luig0
Copy link

luig0 commented May 22, 2020

📝 Provide detailed reproduction steps (if any)

  1. Visit demo page Pasting content from Microsoft Word
  2. Download sample Word document
  3. Copy table from sample Word document and paste it into the demo editor

Screen Shot 2020-05-22 at 12 18 09 PM

Screen Shot 2020-05-22 at 12 18 49 PM

✔️ Expected result

Copied table cell background colors from Word document are properly transferred to Ckeditor5 as described at Table styles compatibility with CKEditor 4 and office suites (Word, Excel, Google Docs) #5652.

❌ Actual result

Table loses cell background color data after it is pasted into CKE. This appears to be happening in upcasting (?); some table cell inline styles are transferred to attributes, while others are not.

📃 Other details

  • Browser: Chrome Version 81.0.4044.138 (Official Build) (64-bit)
  • OS: macOS Catalina Version 10.15.4 (19E287)
  • CKEditor version: @ckeditor/[email protected]
  • Installed CKEditor plugins: A bunch, but this issue exists in the demo editor at Pasting content from Microsoft Word

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

@luig0 luig0 added the type:bug This issue reports a buggy (incorrect) behavior. label May 22, 2020
@Reinmar Reinmar added this to the next milestone May 25, 2020
@mlewand
Copy link
Contributor

mlewand commented May 25, 2020

Looks like a regression was working in v17: https://ckeditor.com/docs/ckeditor5/17.0.0/features/pasting/paste-from-word.html#demo

@mlewand mlewand added the type:regression This issue reports a bug that was not present in the previous releases. label May 25, 2020
@Reinmar
Copy link
Member

Reinmar commented May 26, 2020

Since this will require bisecting changes before our migration to monorepo, this will be useful: https://ckeditor.com/docs/ckeditor5/17.0.0/framework/guides/contributing/development-environment.html#bisecting-through-a-multi-repository

@Reinmar Reinmar modified the milestones: next, iteration 33 May 26, 2020
@Reinmar
Copy link
Member

Reinmar commented May 27, 2020

BTW, from some reports that I saw, I gather that  font colors and other font styles may be lost now too. We need to check all the formatting here. 

To whoever will work on this:

  • Make sure to enable PasteFromOffice plugin,
  • Make sure to use the supportAllValues config options of the font plugins,
  • Use table properties and font plugins.

In other words – use the same setup as in the Paste from Word demo in the docs.

@Reinmar
Copy link
Member

Reinmar commented May 27, 2020

#7295 (comment) contains some really interesting findings about setups that don't work. The issue is much wider than just about tables (or we have two different regressions at the same time, which is unlikely).

@niegowski niegowski self-assigned this May 27, 2020
oleq added a commit that referenced this issue May 28, 2020
Fix (paste-from-office): The Paste from Office feature should use the same instance of `StylesProcessor` as the view document. Closes #7275.
@luig0
Copy link
Author

luig0 commented May 28, 2020

@Reinmar @mlewand @niegowski @oleq Thank you for the quick turn!

pomek pushed a commit that referenced this issue May 29, 2020
Fix (paste-from-office): The Paste from Office feature should use the same instance of `StylesProcessor` as the view document. Closes #7275.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug This issue reports a buggy (incorrect) behavior. type:regression This issue reports a bug that was not present in the previous releases.
Projects
None yet
4 participants