Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16810 closed Bug (fixed)

Missing table vertical align when pasted from Word

Reported by: Marek Lewandowski Owned by: Marek Lewandowski
Priority: Normal Milestone: CKEditor 4.7.0
Component: Plugin : Paste from Word Version: 4.6.0
Keywords: Cc:

Description

Steps to reproduce

  1. Open attached Table_vertical_alignment.docx document in Word.
  2. Copy it's content.
  3. Paste into a full featured editor.

Expected result

Table cells keeps it's different alignments.

Actual result

Alignments are stripped.

Attachments (3)

Screenshot from 2017-01-20 17-36-21.png (62.6 KB) - added by Tade0 7 years ago.
Screenshot from 2017-01-20 17-36-41.png (101.4 KB) - added by Tade0 7 years ago.
Table_vertical_alignment.docx (11.6 KB) - added by Marek Lewandowski 7 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 7 years ago by Marek Lewandowski

Status: newconfirmed

comment:2 Changed 7 years ago by Marek Lewandowski

Owner: set to Marek Lewandowski
Status: confirmedreview

Pushed to branch:t/16810

Changed 7 years ago by Tade0

Changed 7 years ago by Tade0

comment:3 Changed 7 years ago by Tade0

Status: reviewreview_failed

The attribute is preserved and present in the resulting content, but there's one problem:

In the paste from Word dialog the vertical align is clearly visible - that's expected.

In the editable though it is not. Switching to source or inspecting the HTML reveals, that the attribute is indeed present, but apparently it's overridden by something(perhaps some CSS rules).

EDIT: attached screenshots.

Last edited 7 years ago by Tade0 (previous) (diff)

Changed 7 years ago by Marek Lewandowski

comment:4 Changed 7 years ago by Marek Lewandowski

Status: review_failedreview

The issue here was that ACF was stripping it, as tabletools were registering only style=vertical-align ACF rule, without any transformations for it.

Solution here was to add support for converting table valign to the format that tabletools uses.

It make sense to check integration with "Cell properties" dialog.

Unfortunately there's another issue, that PFW doesn't preserve table/cell height - thus one can't really see the alignment. This will be extracted into a separate ticket (#16812).

Repushed to t/16810.

Last edited 7 years ago by Marek Lewandowski (previous) (diff)

comment:5 Changed 7 years ago by Tade0

Status: reviewreview_passed

Taking into account that the table/cell height is a separate issue LGTM.

Version 0, edited 7 years ago by Tade0 (next)

comment:6 Changed 7 years ago by Tade0

Status: review_passedreview_failed

There are failing unit tests in the PFW suite.

comment:7 Changed 7 years ago by Marek Lewandowski

Status: review_failedreview

It was broken with git:a25120c43cbf5d2aee7051d8697f368dccae7234 fixtures were prepared for valign attribute, while transformation would convert it into a CSS style.

Actually it make sense to apply the transformation only if CSS property is allowed (otherwise it might be lost, even though td[valign] was allowed). Updated tests to work with valign in branch:t/16810.

comment:8 Changed 7 years ago by Tade0

Status: reviewreview_passed

I have some doubts about this solution, but since there are tests that specifically test this feature it doesn't matter.

LGTM.

comment:9 Changed 7 years ago by Tade0

Resolution: fixed
Status: review_passedclosed

comment:10 Changed 7 years ago by Marek Lewandowski

Component: GeneralPlugin : Paste from Word

comment:11 Changed 7 years ago by Marek Lewandowski

Summary: Missing vertical align when pasted from WordMissing table vertical align when pasted from Word
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy