Opened 9 years ago
Closed 8 years ago
#14555 closed Bug (fixed)
Texts changes to some weird characters when pasting table from Word
Reported by: | Ugur Ozkan | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.0.1 |
Keywords: | Cc: |
Description
Steps to reproduce
- Copy table from Word (either CTRL + C or right click -> Copy)
- Open ckEditor Demo from http://ckeditor.com/demo
- Paste it (either use CTRL + V or right click -> Paste or one of the paste buttons above [except the middle one])
Expected result
Same output as seen in the Word
Actual result
Other details (browser, OS, CKEditor version, installed plugins)
OS: Windows 10
CKEditor version: latest version as stated here https://dev.ckeditor.com/wiki/Bugs#ReproduceonDemoPageandorNightlyBuild
Browser: Chrome Version 49.0.2623.87 m
Attachments (3)
Change History (8)
Changed 9 years ago by
Attachment: | testText.docx added |
---|
comment:1 Changed 9 years ago by
Interestingly the popup window that appears when clicking one of the paste buttons above shows everything normally.
comment:2 Changed 9 years ago by
Keywords: | Word Table Copy-Paste removed |
---|---|
Status: | new → confirmed |
Version: | 4.5.7 → 4.0.1 |
This is werid, especially when looking at below HTML from 3 different cells. First one is ok while two others get interpreted as lists although HTML looks the same.
Problem can be reproduced from CKEditor 4.0.1 in Firefox and Chrome. IE works as expected. I also need to add that native contenteditable elements like div and iframe interpret whole table correctly.
<td width="161" valign="top" style="width:120.5pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0cm 5.4pt 0cm 5.4pt"> <p class="MsoListParagraphCxSpMiddle" align="center" style="margin: 0cm 0cm 0.0001pt; text-align: center;"><span lang="TR" style="font-size:10.0pt;mso-ascii-font-family:Calibri;mso-hansi-font-family: Calibri;mso-ansi-language:TR;mso-bidi-font-weight:bold">Ders Adı<o:p></o:p></span></p> </td> <td width="66" valign="top" style="width:49.6pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0cm 5.4pt 0cm 5.4pt"> <p class="MsoListParagraphCxSpMiddle" align="center" style="margin: 0cm 0cm 0.0001pt; text-align: center;"><span lang="TR" style="font-size:10.0pt;mso-ascii-font-family:Calibri;mso-hansi-font-family: Calibri;mso-ansi-language:TR;mso-bidi-font-weight:bold">Not<o:p></o:p></span></p> </td> <td width="57" valign="top" style="width:42.5pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0cm 5.4pt 0cm 5.4pt"> <p class="MsoListParagraphCxSpMiddle" align="center" style="margin: 0cm 0cm 0.0001pt; text-align: center;"><span lang="TR" style="font-size:10.0pt;mso-ascii-font-family:Calibri;mso-hansi-font-family: Calibri;mso-ansi-language:TR;mso-bidi-font-weight:bold">G<o:p></o:p></span></p> </td>
NOTE: When I check format of text entered in cells, I can see they all have "List Paragraph" format and when you assign for example "No spacing" or "Normal", table is pasted correctly. @uguurozkan could you perhaps explain why have you created table content with that sort of formatting in MS Word?
comment:3 Changed 9 years ago by
The table is part of a list element. There is some text before it and another list element after it. So, when the table is added, format comes automatically. I added whole test text so you can see.
Changed 9 years ago by
Attachment: | tableInList.docx added |
---|
comment:4 Changed 9 years ago by
Thank you for explanation. You are right table in list gets List Paragraph formatting. That is correct.
Looking at your example however I must say - what you have is not a list but simply paragraphs with numbers in fornt. Please see tableInList.docx
file. This is how it should look like and result after pasting is correct (I will get to that in detail in a sec). It is still a mystery, at least to me, how such table can be created (what needs to be clicked in MS WORD) on daily basis.
Having said all that, it is worth looking into this ticket despite, me not knowing how to create such table, since it has worked in CKEditor 4.0.0 .
The result from my file: List will get pasted as three different lists and this is correct because browser sees this code as:
List Paragraph List Paragraph Table List Paragraph Table with List Paragraph inside List Paragraph
Tables have no information that they are part of list, thus browser sees it like shown above and CKEditor interprets it as 3 lists. There is not much we can do in such case.
comment:5 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
Problems mentioned in this ticket can no longer be reproduced in latest CKEditor 4.6.2
Test Input