Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#10969 closed Bug (duplicate)

[IE] Paragraph styling is not preserved after pasting (using Ctrl+V or Paste dialog)

Reported by: peter Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version:
Keywords: IBM Cc: Teresa Monahan, Satya Minnekanti, Irina

Description (last modified by Piotrek Koszuliński)

Reproduce the issue:

  1. Open CKEditor and type in some word.
  2. Click on Align Center
  3. Select all and cut by using CTRL+A and CTRL+X .
  4. Refresh the browser.

Version 1:

  1. Click on paste icon.
  2. In Paste Dialog CTRL+V and press OK.

Version 2:

  1. Press CTRL+V.

Expected results:

The style - align center should be applied (preserved) after pasting in the editor body through in both variants of the TC. The cut word from step 3 should be displayed in the center of the editor body. Note! In the Paste dialog the style appears to be correct, when transferring it to the editor body is lost.

Actual result:

The cut word from step 3 is displayed at the left on the editor body.

It is happen also with indentation.

issue occurs only in Internet Explorer .

DUP: #10550.

Change History (9)

comment:1 Changed 6 years ago by peter

its happen with language direction as well.

Version 0, edited 6 years ago by peter (next)

comment:2 Changed 6 years ago by peter

Its happen with language directions as well.

comment:3 Changed 6 years ago by peter

The same issue appears when you cut and paste directly into editor body.

Reproduce the issue:

  1. Open Ajax sample type in some word and apply styling by pressing relevant icon.

Styling : Alignment, indentation and language direction

  1. Select all and cut (CTRL+A & CTRL+X)
  2. Paste (CTRL+V)

Expected result: The style applied should be preserved after cut and paste.

Actual result: The style is lost.

comment:4 Changed 6 years ago by Jakub Ś

Status: newconfirmed
Version: 4.2.2

I was able to reproduce this problem from CKEditor 4.0 beta (works fine in CKE 3.6.6) in IE8-10.

Please note that this is happening with one paragraph or header only. If you paste more paragraphs, header and paragraph or more headers, problem doesn't occur.

NOTE: When you copy/paste header like that not only e.g. alignment is lost but also H1 tag (h1 gets turned into p)

Last edited 6 years ago by Jakub Ś (previous) (diff)

comment:5 Changed 5 years ago by Piotrek Koszuliński

Actually, this is an intentional behaviour. As long as user copies the content of a single paragraph our HTML insertion algorithm ignores the block element and insert its contents only. The reason why it works this way is that other browsers than IE, while copying a single paragraph, lose information about the block. Therefore, to create the same behaviour on IE and other browsers we ignore the information about pasted block when inserting that HTML into editor.

However, when we'll have #11636 we can change what lands in the clipboard on other browsers, so when a whole paragraph is selected it is pushed into the clipboard. Then we could change the behaviour of inserHtml to not ignore whole blocks. Although, that will be a lot of work to modify these two methods.

comment:6 Changed 5 years ago by Piotrek Koszuliński

Description: modified (diff)
Summary: IE:Styling does not preserved after pasting through Paste Dialog[IE] Paragraph tyling does not preserved after pasting (using ctrl+v or paste dialog)

comment:7 Changed 4 years ago by Marek Lewandowski

Summary: [IE] Paragraph tyling does not preserved after pasting (using ctrl+v or paste dialog)[IE] Paragraph styling is not preserved after pasting (using ctrl+v or paste dialog)

comment:8 Changed 4 years ago by Piotrek Koszuliński

Resolution: duplicate
Status: confirmedclosed

DUP of #10924.

comment:9 Changed 4 years ago by Anna Tomanek

Summary: [IE] Paragraph styling is not preserved after pasting (using ctrl+v or paste dialog)[IE] Paragraph styling is not preserved after pasting (using Ctrl+V or Paste dialog)
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy