Opened 14 years ago
Closed 14 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 )
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):
- Select an entire table by highlighting it with the cursor.
- Copy by using the usual short-cut... Command-C on a Mac. Control-C on Windows.
- Insert the cursor where you want to paste the table.
- Paste by using the usual short-cut... Command-V on a Mac. Control-V on Windows.
- 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: http://cksource.com/forums/viewtopic.php?f=11&t=19888
Change History (4)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 14 years ago by
Component: | General → Core : Pasting |
---|---|
Keywords: | Webkit added |
Status: | new → confirmed |
comment:3 Changed 14 years ago by
Version: | 3.4 → 3.5.1 |
---|
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: http://www.nytimes.com/2011/03/16/world/asia/16nuclear.html?_r=2&hp
Important fact for reproduction - table must be border-less.