When I copy text from Microsoft Word into CKEditor using CKEditor's Word input utility, the text acquires extra top and bottom margins, i.e. if I subsequently style a paragraph with CSS top and bottom margins set to zero, they will be something like 20px and 20px instead. This requires me to have two sets of styles, one for text copied from pure HTML (no abnormal CSS behavior here) and one for text copied from Microsoft Word (abnormal CSS behavior that requires CSS margin over-compensation, usually by setting margins to negative pixels). This problem occurs whether I use the combination CKEditor module + CKEditor library, or the combination WYSIWYG module + CKEditor library. I noticed that the same problem arises with the combination WYSIWYG module + TinyMCE library, at least on my Drupal system. This could mean that some common code between CKEditor and TinyMCE is creating this CSS anomaly.
Thanks, Ben

CommentFileSizeAuthor
#2 CDEditor Demo.PNG96.81 KBbentleychan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mkesicki’s picture

Status: Active » Postponed (maintainer needs more info)

@bentleychan can you check on demo site : http://ckeditor.com/demo if you can reproduce this issue there ?
It looks like problem with CKEditor library and Word.

bentleychan’s picture

FileSize
96.81 KB

Thanks, michal_cksource, for your reply. I inserted two paragraphs into the CKEditor demo as you suggested, and could not reproduce the problem there. (See attached picture and the highlighted paragraphs.) On my local Drupal setup, I checked the plaintext HTML of the problematic nodes into which were inserted Word files, but could not find any unexpected CSS classes. I am using Danland theme with Drupal 7, both latest recommended. I worked around the problem with some kludge CSS styles, and everything seems okay despite my inelegant solution. Thanks, Ben

bentleychan’s picture

I should clarify that my original words "acquires extra top and bottom margins" are not quite accurate. That statement (incorrectly) gives the impression that there are lots of spacing between paragraphs. Actually, the spacing between paragraphs looks normal, but there is a "vertical displacement" (that is a probably a more accurate term). When I apply a style to just one paragraph with zero top and bottom margins, that paragraph lowers itself with respect to the other paragraphs and slightly overlaps with the next one. I don't see any special styling in the plaintext HTML code that indicates the presence of any unknown CSS style that would displace the whole article. Thanks, Ben