Opened 7 years ago

Closed 11 months ago

#7291 closed Bug (worksforme)

Wrong aligned tables from Word

Reported by: Flavien CROCHARD Owned by: Tade0
Priority: Normal Milestone:
Component: Plugin : Paste from Word Version: 3.1
Keywords: Cc:

Description

Paste into CKEditor from word two tables on a same line (first aligned left, and second aligned right). You'l see in CKeditor the two tables not on the same line (separated by a <div style="clear:both">).

Attachments (1)

sample.docx (12.8 KB) - added by Flavien CROCHARD 13 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 7 years ago by Krzysztof Studnik

Component: GeneralCore : Pasting
Keywords: word tables removed
Status: newconfirmed
Version: 3.5.3 (SVN - trunk)3.1

comment:2 Changed 4 years ago by Frederico Caldeira Knabben

Component: Core : PastingPlugin : Paste from Word

comment:3 Changed 13 months ago by Tade0

Milestone: CKEditor 4.6.0

Unable to reproduce. Do tables in Word even respect alignment?

comment:4 Changed 13 months ago by Flavien CROCHARD

Yes they do. Here is on attachment as described below.

Tested on ckeditor.com/demo and I still reproduce it :)

Changed 13 months ago by Flavien CROCHARD

Attachment: sample.docx added

comment:5 Changed 12 months ago by Marek Lewandowski

Milestone: CKEditor 4.6.0CKEditor 4.6.1

@flavien Thank you very much for the feedback! We'll not be able to contain it within 4.6.0 - but having improved Paste From Word, we'll revisit this issue in 4.6.1.

comment:6 Changed 12 months ago by Marek Lewandowski

Milestone: CKEditor 4.6.1CKEditor 4.6.2

comment:7 Changed 11 months ago by Tade0

This is how an empty, left-aligned one-cell table looks in the clipboard: http://jsfiddle.net/a5khaqds/

Note the lack of align="left" attribute, the equivalent of which is present in right-aligned tables.

Normally this would mean that it's impossible to fix this bug because the relevant information is lost, but _at least a few times_ I managed to copy a table with the proper attribute set. For some reason this behaviour cannot be consistently reproduced.

comment:8 Changed 11 months ago by Tade0

Owner: set to Tade0
Status: confirmedassigned

comment:9 Changed 11 months ago by Tade0

Motion to flag this ticket as "wontfix". Reason:

  1. Open the attached sample in Word.
  2. Copy its contents.
  3. Create a new document and paste the clipboard contents into it.

Note how most of the time(but not always!) the shape of the tables is different than in the original document and similar to what's pasted to CKE.

comment:10 Changed 11 months ago by Marek Lewandowski

Milestone: CKEditor 4.6.2
Resolution: worksforme
Status: assignedclosed

This is what I get after pasting given .docx into CKEditor with ACF disabled:

<table class="MsoTableGrid" style="margin-left:35.4pt; border-collapse:collapse; border:solid windowtext 1.0pt">
    <tbody>
        <tr>
            <td width="76" style="width:56.7pt; border:solid windowtext 1.0pt">
                <p style="margin-bottom:.0001pt; padding:0in 5.4pt 0in 5.4pt"><span style="line-height:normal">A</span>
                </p>
            </td>
        </tr>
    </tbody>
</table>
<table class="MsoTableGrid" align="right" style="border-collapse:collapse; border:solid windowtext 1.0pt; margin-left:4.8pt; margin-right:4.8pt">
    <tbody>
        <tr>
            <td width="76" style="width:56.7pt; border:solid windowtext 1.0pt">
                <p style="margin-bottom:.0001pt; padding:0in 5.4pt 0in 5.4pt"><span style="line-height:normal">B</span>
                </p>
            </td>
        </tr>
    </tbody>
</table>
<p> </p>

I don't see any div with clear:both there. And going back to what @Tade0 wrote - yes this is just exactly how Word pastes it. So having the tables aligned, it works as expected.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy