Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#7622 closed Bug (wontfix)

Paste from notepad inconsistencies between browsers, formatting issue in IE8

Reported by: Michael Camden Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 3.0
Keywords: CantFix Cc: mcamden@…


When pasting the attached text file it is correctly displayed in FF/Chrome with the line spacing. In IE the extra spaces are lost. I'm using the default enter mode (paragraph), my CSS file has removed the margin between paragraphs.

p {margin-top: 0px;margin-bottom: 0px;}

In IE, 3 paragraphs are generated. In FF 2 BR tags are inserted in between the sentences. In Chrome DIV blocks are created to maintain formatting. IE is the only browser that loses formatting in this case.

Steps to reproduce:

  1. Copy attached text
  2. Paste text in editor

Attachments (1)

simple notepad file.txt (402 bytes) - added by Michael Camden 13 years ago.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by Michael Camden

Attachment: simple notepad file.txt added

comment:1 Changed 13 years ago by Jakub Ś

Keywords: paste plain text IE removed
Status: newconfirmed

Copy the text from file and use CRTL+V or paste button to paste it.

FF3, FF4, Opera - use br to keep formating. This is from CKEditor 3.0

Webkit uses divs to keep formatting. This is from CKEditor 3.2.1

IE (all versions) use <p> tags for patsed text.
NOTE: Using no margin for paragraphs

p {margin-top: 0px;margin-bottom: 0px;}

affects only IE because it is the only browser that uses those tags for pasted text.
This is the result of browser inconsistencies, so the part about IE formatting issue should be (at least in my opinion) ignored.

comment:2 Changed 13 years ago by Frederico Caldeira Knabben

Keywords: CantFix added
Resolution: wontfix
Status: confirmedclosed

This is caused by the automatons browsers do on pasted data. It's also related to the clipboard interchange feature present in both the browsers and Notepad (or the application used to open the text file).

The fact here is that we can't do anything to solve this problem. The editor receives "post-processed" data, where BRs, DIVs or Ps are already in place. We cannot normalize the data at that point, because we are not able to understand what exactly the source data looked like.

In such cases we can only recommend using the Paste as Plain Text button or simply force plain text pasting through configuration.

comment:3 Changed 12 years ago by Jakub Ś

This is a won't fix in CKEditor 3.x but it will be fixed in CKEditor 4.x for which RC will be introduced soon.

Btw. this is a DUP of #6131

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