Opened 15 years ago

Closed 15 years ago

#3872 closed Bug (wontfix)

Pasted text takes on style at cursor location

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

Description (last modified by Frederico Caldeira Knabben)

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 (4)

comment:1 Changed 15 years ago by Garry Yao

Keywords: Pending added

WFM, could you please give more detail on reproducing?

comment:2 Changed 15 years ago by Garry Yao

Description: modified (diff)
Keywords: WorksForMe added; Pending removed
Resolution: fixed

comment:3 Changed 15 years ago by Damian

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 15 years ago by Frederico Caldeira Knabben

Description: modified (diff)
Keywords: CantFix added; WorksForMe removed
Resolution: fixedwontfix
Status: newclosed

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 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy