Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#6241 closed Bug (wontfix)

[[IE]] some format is lost during paste

Reported by: Satya Minnekanti Owned by: Paweł Horzela
Priority: Normal Milestone:
Component: Plugin : Paste from Word Version:
Keywords: IBM IE Firefox Opera Cc: Damian, joek, jamcunni@…

Description

To reproduce the defect:

  1. Open Ajax sample.
  1. Copy the text in the attached doc and paste it using Paste from Word dialog.

see the differences in IE and FF.

In IE text is shown with out bold and with small font size wher as in FF it is shown properly.

Attachments (5)

Sample word doc.docx (11.7 KB) - added by Satya Minnekanti 9 years ago.
Pasted text shown in FF.jpg (21.1 KB) - added by Satya Minnekanti 9 years ago.
Pasted text shown in IE.jpg (13.7 KB) - added by Satya Minnekanti 9 years ago.
krst_13.34.02.png (47.6 KB) - added by Krzysztof Studnik 9 years ago.
6241.patch (689 bytes) - added by Paweł Horzela 9 years ago.
Patch

Download all attachments as: .zip

Change History (18)

Changed 9 years ago by Satya Minnekanti

Attachment: Sample word doc.docx added

Changed 9 years ago by Satya Minnekanti

Attachment: Pasted text shown in FF.jpg added

Changed 9 years ago by Satya Minnekanti

Attachment: Pasted text shown in IE.jpg added

Changed 9 years ago by Krzysztof Studnik

Attachment: krst_13.34.02.png added

comment:1 Changed 9 years ago by Krzysztof Studnik

Keywords: IE Firefox Opera added
Status: newconfirmed

Formating is also lost in Firefox and Opera

comment:2 Changed 9 years ago by Paweł Horzela

Owner: set to Paweł Horzela
Status: confirmedassigned

comment:3 Changed 9 years ago by Paweł Horzela

@satya: Are you sure that names of the attachments are correct? I have opposite results using IE and FF. But anyway, the problem still exists.

The text pasted from word is not bolded, because in attached word document there is also no bolded text. But when I bold some text in word, it works in IE, FF, Opera, Chrome.

I can reproduce only issue connected with font size. It works in IE, but doesn't work in Opera, FF, Chrome.

I've noticed some strange behaviours:

  1. This issue exists only when the font size in word is set to 26. When you set any other size, everything works fine.
  1. When you set font size to 26 in word, text pasted from word (before any filtering or processing in ckeditor) is missing information about font size. Only in IE there is a tag: <FONT size=7>. But when you set font size lower or higher than 26, after pasting from word, in every browser there is information about font size: 'FONT-SIZE: 36pt'.

Changed 9 years ago by Paweł Horzela

Attachment: 6241.patch added

Patch

comment:4 Changed 9 years ago by Paweł Horzela

If font size is not set it means that font size is 26pt. Using this strange behaviour I create patch that fix this issue.

comment:5 Changed 9 years ago by Paweł Horzela

Status: assignedreview

comment:6 Changed 9 years ago by Garry Yao

Status: reviewreview_failed

It's not good, we should apply '26pt' in case <FONT size=7> is found instead, also note that font size is presented only if both of the following entires are configured.

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

comment:7 Changed 9 years ago by Paweł Horzela

For now, as a solution and fix for IE, set flags in config.js file to:

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

It should work.

There is still some small problem in FF (with font-size), but after investigation, I've noticed that it depends on platform. It might happen that /* Style Definitions */ in metainfo pasted from word is different on various platform. It won't be fixed now.

comment:8 Changed 9 years ago by Paweł Horzela

Resolution: wontfix
Status: review_failedclosed

comment:9 Changed 9 years ago by James

Cc: jamcunni@… added

comment:10 Changed 9 years ago by Damian

Why was this ticket closed as wontfix?

comment:11 Changed 6 years ago by David

Why wont this issue be fixed?

Please share with the community a justifiable and logical reason why this font size and style doesn't carry from MS Word to CK.

I cannot express how frustrating this problem is. You have 10's (if not hundreds) of thousands of end users who use Microsoft Office and have no engineering experience to sift through this kind of technical detail to determine a suitable solution other than brutal trial and error and painstaking transition to format documents from within the UI of CK editor. It doesn't always retain formatting from one editing session to the next and it isn't as WYSIWYG as you might think for those who think Ajax is for the kitchen.

The paste from word option doesn't really work as an alternative workaround for formatting consistency. I have made all the excuses in the book - converting from Microsoft formatting to HTML formatting is no different than users converting an OCR document, or from Word Perfect to Word...there simply are formatting differences that wont carry forward in the paste to CK. That only works for a few years. Now the problem is huge, well known, without answer. It appears more like negligence and deliberate disregard for developer to user respect.

Font sizes and style should retain or have a justifiable reason why they can't. Please share with the community a justifiable and logical reason why this font size and style doesn't carry from MS Word to CK.

Thank you.

comment:12 Changed 6 years ago by Jakub Ś

  1. First of all you should use in config.js or instance configuration below settings. They are set to true by default. Please see http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveStyles
    http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordRemoveFontStyles.
    Please also note that there is no error with configuration option - this is what they are for you can set them or not.
    config.pasteFromWordRemoveStyles = false;
    config.pasteFromWordRemoveFontStyles = false;
    
  1. Please also note that In all cases, the editor privileges semantics over formatting, so the end results will never look like the original.
    CKEditor makes it best to translate the information send from Word through the clipboard and many times it needs to come to an agreement. In those cases we prioritize semantics instead of formatting.
    In plain words - you have two different worlds: Desktop MS Word which uses styled paragraphs and spans for everything plus sometimes custom MS specific styles and Browser CKEditor which has to follow strict HTML guide lines which as you well know doesn't have to be the same (and aren’t) as in desktop.

comment:13 Changed 5 years ago by Frederico Caldeira Knabben

Component: Core : PastingPlugin : Paste from Word
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy