Opened 6 years ago

Closed 7 weeks ago

#7291 closed Bug (worksforme)

Wrong aligned tables from Word

Reported by: flavien 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 3 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 6 years ago by krst

  • Component changed from General to Core : Pasting
  • Keywords word tables removed
  • Status changed from new to confirmed
  • Version changed from 3.5.3 (SVN - trunk) to 3.1

comment:2 Changed 3 years ago by fredck

  • Component changed from Core : Pasting to Plugin : Paste from Word

comment:3 Changed 3 months ago by Tade0

  • Milestone set to CKEditor 4.6.0

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

comment:4 Changed 3 months ago by flavien

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

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

Changed 3 months ago by flavien

comment:5 Changed 3 months ago by m.lewandowski

  • Milestone changed from CKEditor 4.6.0 to CKEditor 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 3 months ago by m.lewandowski

  • Milestone changed from CKEditor 4.6.1 to CKEditor 4.6.2

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

  • Owner set to Tade0
  • Status changed from confirmed to assigned

comment:9 Changed 7 weeks 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 7 weeks ago by m.lewandowski

  • Milestone CKEditor 4.6.2 deleted
  • Resolution set to worksforme
  • Status changed from assigned to closed

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 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy