Opened 12 years ago

Last modified 8 years ago

#9340 confirmed Bug

Import of bulleted list from MS Word fails when the bullets are styled — at Version 9

Reported by: Adam T Nagy Owned by:
Priority: Normal Milestone:
Component: Plugin : Paste from Word Version: 3.6.4
Keywords: Cc:

Description (last modified by Jakub Ś)

Copy/Pasting a bulleted list from Microsoft Word ends up in broken text.

Pasting the bulleted list from the attached file doesn't work.

I have a feeling that it is related to the encoding of the file, since I cannot reproduce it on a newly created file


The real problem here is that if below two options are not set to false table gets broken which should not hapen:

config.pasteFromWordRemoveFontStyles=false;
config.pasteFromWordRemoveStyles=false;

Change History (10)

Changed 12 years ago by Adam T Nagy

Attachment: test_ckeditor.docx added

comment:1 Changed 12 years ago by Jakub Ś

Keywords: bulleted list microsoft word removed
Status: newpending

You need to have these two properties set to false (in config.js) to keep styles from word:

config.pasteFromWordRemoveFontStyles=false;
config.pasteFromWordRemoveStyles=false;

I have noticed that this list is not recognized by browser as list.

Could you tell me how have you created this list or this is just one time "accident" that can't be reproduced?

comment:2 Changed 12 years ago by Jakub Ś

Status: pendingconfirmed

One thing is for sure. When these properties are not set then table gets broken.

Last edited 12 years ago by Jakub Ś (previous) (diff)

comment:3 Changed 12 years ago by Jakub Ś

When taking such element form list and pasting it in IE this is how browser see this code:

<pre style="text-align: justify; text-indent: -18pt; margin-left: 46.35pt; mso-list: l0 level1 lfo1; tab-stops: list 46.35pt left 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="background: yellow; font-family: Symbol; font-size: 11pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol; mso-highlight: yellow;" lang="LT"><span style="mso-list: Ignore;">•<span style='font: 7pt/normal "Times New Roman"; font-size-adjust: none; font-stretch: normal;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span dir="LTR"></span><span style='background: yellow; font-family: "Trebuchet MS","sans-serif"; font-size: 11pt; mso-bidi-font-family: "Times New Roman"; mso-highlight: yellow;' lang="LT">text<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></span></pre>

Besides background colour, styles for list and typical styles there is also pre tag.

@adam.nagy could you tell us

  1. What are the steps to create such list?
  2. What steps need to be taken to create such list in table? Perhaps you have added something extra there?

comment:4 Changed 12 years ago by Adam T Nagy

Hi,

I received the doc file from a third party so I cannot provide the requested information. It is interesting that if I open it with OpenOffice everything works well by the way.

I asked the owner of the original document to have a look at the investigation here and review your questions.

Also when copy/pasting the mentioned part to MS Excel and rewriting it, then it changes the font to "symbol" and when I write all Greek characters show up.

Spooky.

Thanks, Adam

comment:5 Changed 12 years ago by Vilius

Hello,

I am original contributor of the document. It is very likely the original document originated from earlier versions of MS Word. It was provided by our client and it's original extension was .doc (not .docx). The file was created in Lithuanian locale. The table must have been copied from some sort of template via copy-paste so it would be very difficult to trace the roots of this table.

Vilius

comment:6 Changed 12 years ago by Jakub Ś

First of all, thank you for the feedback. It's nice to see users participating in resolving issues.

Not having way to recreate this table is not good information but there is still this one file. Perhaps based on it we will be able to additional "if" statement to MS Word filter.

comment:7 Changed 12 years ago by Adam T Nagy

Hi,

I would like to know if there will be a fix for this issue and when it can be expected.

I tried out the mentioned property settings:

config.pasteFromWordRemoveFontStyles=false;
config.pasteFromWordRemoveStyles=false;

The paragraphs pasted correctly but there was a <> tag instead of the bullet points and CKEditor didn't recognize the list as an actual list.

Best regards, Adam

comment:8 Changed 12 years ago by Jakub Ś

The real problem here is that if below two options are not set to false table gets broken which should not hapen:

config.pasteFromWordRemoveFontStyles=false;
config.pasteFromWordRemoveStyles=false;

As for the list itself - it is seen by a browser as spans kept in pre tag.
This is not how MS Word lists look like thus CKEditor pastes pre tag with spans inside it and IMHO does a good job.

This list was probably converted to some code snippet but to be honest I don't know how it was achieved in MS Word.
We will probably have some small discussion about this case but if list (well its visual representation) is seen by browser as pre tag (code snippet) then IMHO this is how it should be pasted and not be changed to list.

Fix for the list is to change it in Word document to list.

comment:9 Changed 12 years ago by Jakub Ś

Description: modified (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy