Opened 8 years ago
Last modified 8 years ago
#16811 closed Bug
No table align when pasted from Word — at Version 2
Reported by: | Marek Lewandowski | Owned by: | |
---|---|---|---|
Priority: | Nice to have (we want to work on it) | Milestone: | CKEditor 4.7.0 |
Component: | General | Version: | 4.6.0 |
Keywords: | Cc: |
Description (last modified by )
Steps to reproduce
- Open attached
Table_alignment.docx
document in Word. - Copy it's content.
- Paste into a full featured editor.
Expected result
Tables are aligned as in the docx document.
Actual result
Alignments are stripped.
More details
It looks in Word pretty much like this:
The problem is that Word generates following markup:
<div align=right> <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 style='(...)'> <tr style='(...)'> (...) </tr> </table> </div>
Which displays it correctly, but uses deprecated align
attribute.
We have a style transformation in core which transforms any align
into float
CSS prop, which is fine for elements like table
, img
, iframe
, but it's wrong for div
and p
. Becasue for div
and p
it defines the alignment of content elements within this element.
It's also worth to remember that align
is a little more aggresive than text-align
CSS prop, as it affects anything, whereas for text-align
you need to apply margin: x auto
for block-alike elements, otherwise they won't be aligned.
Change History (3)
Changed 8 years ago by
Attachment: | Table_alignment.docx added |
---|
comment:1 Changed 8 years ago by
Status: | new → confirmed |
---|
comment:2 Changed 8 years ago by
Description: | modified (diff) |
---|