Opened 21 months ago

Closed 21 months ago

Last modified 18 months 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 21 months ago.
Screenshot from 2017-01-20 17-36-41.png (101.4 KB) - added by Tade0 21 months ago.
Table_vertical_alignment.docx (11.6 KB) - added by Marek Lewandowski 21 months ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 21 months ago by Marek Lewandowski

Status: newconfirmed

comment:2 Changed 21 months ago by Marek Lewandowski

Owner: set to Marek Lewandowski
Status: confirmedreview

Pushed to branch:t/16810

Changed 21 months ago by Tade0

Changed 21 months ago by Tade0

comment:3 Changed 21 months 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 21 months ago by Tade0 (previous) (diff)

Changed 21 months ago by Marek Lewandowski

comment:4 Changed 21 months 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 21 months ago by Marek Lewandowski (previous) (diff)

comment:5 Changed 21 months ago by Tade0

Status: reviewreview_passed

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

Although I see that the build isn't passing. Checking this now.

Last edited 21 months ago by Tade0 (previous) (diff)

comment:6 Changed 21 months ago by Tade0

Status: review_passedreview_failed

There are failing unit tests in the PFW suite.

comment:7 Changed 21 months 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 21 months 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 21 months ago by Tade0

Resolution: fixed
Status: review_passedclosed

comment:10 Changed 20 months ago by Marek Lewandowski

Component: GeneralPlugin : Paste from Word

comment:11 Changed 18 months 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 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy