#10011 closed Bug (fixed)
pasteFromWordRemoveFontStyles ignored in IE9 under certain conditions
Reported by: | Andy Watson | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.6.0 |
Component: | Plugin : Paste from Word | Version: | 3.0 |
Keywords: | IE9 IE10 | Cc: |
Description (last modified by )
Summary: When copying from a Microsoft word document using IE font tags are copied over despite config.pasteFromWordRemoveFontStyles set as true in the config.js.
Steps to reproduce: When you copy part or all of the line of text (but not the paragraph mark at the end) into the editor, the original formatting is retained. However, if you include the paragraph mark at the end of the line, the font tags are correctly stripped. The font is Arial 20 bold, but if changed it to, say, Algerian 20 bold, the font is also correctly stripped on import.
This only happens in IE. I cannot reproduce in Chrome or Firefox.
Browser name and OS: IE9 & Windows 7
Edit:
Please see comment:6 for way to reproduce.
Attachments (7)
Change History (17)
Changed 12 years ago by
Attachment: | CMSPasteTest-1.docx added |
---|
comment:1 Changed 12 years ago by
Status: | new → pending |
---|---|
Version: | 4.0.1 |
I wasn't able to get results you were having.
- These two options are actually set to true by default so there is no need to set them:
config.pasteFromWordRemoveFontStyles=true; config.pasteFromWordRemoveStyles = true;
- In my case the results were E.g.:
<p align="center" dir="RTL"><strong><span dir="LTR">SOME EXAMPLE TEXT IN ARIAL 20 BOLD</span></strong></p> <p align="center"> </p> or <p><strong>EXAMPLE TEXT IN ARIAL </strong></p>
All I got was strong tags.
- Does it happen in demo page or only in CKEditor integrated into your application?
- If in your application then are there any configurations options that you have forgotten to mention?
- Have you got any custom changes or plugins that might influence this?
comment:2 Changed 12 years ago by
Hi there,
Actually testing again in Firefox seems to present similar results. This is happening on the CKEditor demo as well as our installation.
I've attached a screenshot of the CKEditor demo page of what happens when copying only the phrase "SOME EXAMPLE TEXT IN ARIAL 20 BOLD" from the attached word document (no spaces and no carriage return) and what happens when copying and pasting the whole block including carriage return.
comment:3 Changed 12 years ago by
Actually scratch that, it's just IE. See further screenshots (attached).
Changed 12 years ago by
Attachment: | Capture.3.JPG added |
---|
IE9 - text copied without carriage return - showing CK Source Code
Changed 12 years ago by
Attachment: | Capture.5.JPG added |
---|
IE9 - text copied WITH carriage return - showing CK Source Code
comment:4 Changed 12 years ago by
Looks like code in first example is not cleaned. Aren't you getting any alerts or error messages in console when you paste this code?
I have tried few times on IE9 with default setting but with no luck.
Could you tell me:
- Have you got any plugins in IE9 that might influence this behaviour? Could you check this on browser with default settings?
- Has MS word any non-default settings that might cause that? You have mentioned something about paragraph mark. Have you got e.g. show printable characters turned on or any other option?
- Which office version is that?
comment:5 Changed 12 years ago by
Hi,
I don't use IE other than when testing so it's running pretty much out the box. The only add-ons are Adobe PDF, Adobe Flash, Silverlight and Office Document Cache Handler.
I'm using Word 2010 running on default settings and the paragraph return I mentioned is not visible but when selected via Ctrl + A it allows for reproduction of this issue vs selecting only the text itself.
The problem was initially reported to us by a client so I don't believe this is only related/reproducible on our internal system. The client who reported this issue is also using IE9 although I'm not sure what operating system I suspect Windows 7.
I've tried to reproduce this in a virtual machine running XP and IE8 without success so it seems to be a combination of IE9, Windows7 and Word that produces this problem.
Thanks
comment:6 Changed 12 years ago by
Keywords: | IE9 IE10 added |
---|---|
Status: | pending → confirmed |
Version: | → 3.0 |
I have finally managed to reproduce this is IE9 and IE10 from CKEditor 3.0 and in CKEditor 4.x (v4).
To reproduce:
- Open replacebycode sample
- Put cursor in before first character and press enter.
- If element is other than P please change it to P with format dropdown
- Copy text from CMSPasteTest-1.docx as shown in Word.png
- Paste text using Ctrl+V (PasteFromWord toolbar button seems to works fine)
- Switch to source to see the code.
You can always try below shorter TC. I was not however able to reproduce this issue always thus I have also pasted the above TC.
To reproduce:
- Open replacebycode sample
- Clear editor contents with newpage command.
- Copy text from CMSPasteTest-1.docx as shown in Word.png
- Paste text using Ctrl+V (PasteFromWord toolbar button seems to works fine)
- Switch to source to see the code.
Changed 12 years ago by
comment:7 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:8 Changed 11 years ago by
Component: | Core : Pasting → Plugin : Paste from Word |
---|
comment:9 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
Overall this feature works as long as one takes into account: ticket:16653.
comment:10 Changed 8 years ago by
Milestone: | → CKEditor 4.6.0 |
---|
Word document with text formatted to reproduce suspected bug