Ticket #3872 (closed Bug: wontfix)

Opened 5 years ago

Last modified 5 years ago

Pasted text takes on style at cursor location

Reported by: damo Owned by:
Priority: Normal Milestone: CKEditor 3.0
Component: General Version:
Keywords: IBM CantFix Cc:

Description (last modified by fredck) (diff)

To reproduce:

  1. Open nightly Ajax sample
  2. Type some text on a few lines
  3. Apply color to the last line of text and hit ENTER
  4. Select the text in the first line of the document
  5. Paste the selected text at the end of the document

Result: The pasted text takes on the color change instead of keeping its own style.

This applies to other styles also, e.g. bold/italic etc.

Change History

comment:1 Changed 5 years ago by garry.yao

  • Keywords Pending added

WFM, could you please give more detail on reproducing?

comment:2 Changed 5 years ago by garry.yao

  • Keywords WorksForMe added; Pending removed
  • Resolution set to fixed
  • Description modified (diff)

comment:3 Changed 5 years ago by damo

Please try to reproduce with the steps provided in IE7. Works ok in FF3.

After adding text the following source is created:

<p>
	asdasdasdasd</p>
<p>
	asdasdasdasd</p>
<p>
	<span style="color: #b22222">adasdasdasdas</span></p>

Copy the first two paragraphs by selecting them with mouse and using CTRL+C. Place cursor at the end of the last line, hit ENTER and press CTRL+V.

The resulting HTML is:

<p>
	asdasdasdasd</p>
<p>
	asdasdasdasd</p>
<p>
	<span style="color: #b22222">adasdasdasdas</span></p>
<p>
	<span style="color: #b22222">asdasdasdasd</span></p>
<p>
	<span style="color: #b22222">asdasdasdasd</span></p>

comment:4 Changed 5 years ago by fredck

  • Keywords CantFix added; WorksForMe removed
  • Status changed from new to closed
  • Resolution changed from fixed to wontfix
  • Description modified (diff)

The problem here is that clipboard operations are totally out of the editor control. It's controlled by both the source and the target applications (in this case the browser). We're not able to provide a formatting option list after pasting, just like Word does. And actually, the expected behavior is relative (that's the reason why word shows formatting options on pasting). Some users may expect having the text in colored in the above case.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy