Opened 14 years ago

Closed 13 years ago

#6194 closed Bug (duplicate)

Copying and Pasting a Table, Pastes CKeditor's inline styles.

Reported by: Jason Kessel Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 3.5.1
Keywords: Webkit Cc:

Description (last modified by Tobiasz Cudnik)

We use CKeditor as a tool to allow our customers to design WYSIWYG HTML emails. When you copy a table and paste it below, to duplicate an article box for example, the CKeditor inline style for the dotted borders gets pasted in the source. It varies by browser/OS. Here is how to reproduce (even in the nightly build URL):

  1. Select an entire table by highlighting it with the cursor.
  2. Copy by using the usual short-cut... Command-C on a Mac. Control-C on Windows.
  3. Insert the cursor where you want to paste the table.
  4. Paste by using the usual short-cut... Command-V on a Mac. Control-V on Windows.
  5. View source. You will see all this inline style on the <table> and every <td>:
    style="border-top-color: rgb(211, 211, 211); border-right-color: rgb(211, 211, 211); border-bottom-color: rgb(211, 211, 211); border-left-color: rgb(211, 211, 211); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dotted; border-right-style: dotted; border-bottom-style: dotted; border-left-style: dotted; "

The above style gets sent in the email and therefore shows the dotted border on the pasted table. Here is the results of this in various browsers and OS's:

Safari - Mac: Inline styles get pasted and sent. Chrome - Mac: Inline styles get pasted and sent. Plus the entire email layout is duplicated about six times in the message. Weird!!! Firefox - Mac: Selecting the table doesn't work well. No inline styles get pasted, but any images in the table are broken once sent. IE8 - Windows: Everything worked perfectly. Safari - Windows: Inline styles get pasted and sent. Chrome - WIndows: Inline styles get pasted and sent. Doesn't have the same issue as the Mac mentioned above. Firefox - Windows: Selecting a table is impossible.

For screenshots and more info, go here:

Change History (4)

comment:1 Changed 14 years ago by Tobiasz Cudnik

Description: modified (diff)

comment:2 Changed 14 years ago by Tobiasz Cudnik

Component: GeneralCore : Pasting
Keywords: Webkit added
Status: newconfirmed

Important fact for reproduction - table must be border-less.

comment:3 Changed 13 years ago by Aaron Winborn


I see a similar issue when copying from chrome; styles are pasted through from divs, but not with other editors. I used a blog post from NY Times as an example, in Drupal + WYSIWYG + CKEditor:

comment:4 Changed 13 years ago by Garry Yao

Resolution: duplicate
Status: confirmedclosed

DUP of #7942.

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