Opened 3 years ago

Closed 3 years ago

#13883 closed Bug (fixed)

Copying table using context menu strips off styles.

Reported by: Jakub Ś Owned by: Piotr Jasiun
Priority: Normal Milestone: CKEditor 4.5.5
Component: General Version: 4.5.0
Keywords: Blink Webkit Support Cc:

Description

Steps to reproduce

  1. Paste below code in source mode and switch to wysiwyg
    <table border="1" cellpadding="1" cellspacing="1" style="width:500px">
        <tbody>
            <tr>
                <td style="background-color: rgb(102, 102, 204);">s</td>
                <td>s</td>
            </tr>
            <tr>
                <td>s</td>
                <td style="background-color: rgb(255, 255, 0);">s</td>
            </tr>
            <tr>
                <td style="background-color: rgb(255, 204, 0);">s</td>
                <td style="background-color: rgb(255, 204, 0);">s</td>
            </tr>
        </tbody>
    </table>
    
  2. Select cells using mouse and press Ctrl+C or roght-click and select copy
  3. Paste table using context menu - right-click somewhere below the table and select Paste (Paste into dialog using Ctrl+V and click OK)

Expected result

Just like in case of keyboard (Ctrl+C, Ctrl+V) table should be pasted with background color and width.

Actual result

Styles are being removed and raw table is pasted.

Other details (browser, OS, CKEditor version, installed plugins)

Problem can be reproduced in Blink and Webkit browsers from CKEditor 4.5.0

Change History (8)

comment:1 Changed 3 years ago by Jakub Ś

Temporary workaround is to use Ctrl+C/Ctrl+V

comment:2 Changed 3 years ago by Jakub Ś

Keywords: Support added
Status: newconfirmed

comment:3 Changed 3 years ago by Marek Lewandowski

Milestone: CKEditor 4.5.5

comment:4 Changed 3 years ago by Marek Lewandowski

It possibly can be related with #13884.

comment:5 Changed 3 years ago by Piotr Jasiun

This is because of the pasteFilter (http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-pasteFilter) which is turned on only on Chrome by default. Paste filter removes styles for external paste and is disabled for internal copy and paste. When you use a dialog the paste is thread as external and pasteFilter removes styles.

comment:6 Changed 3 years ago by Piotr Jasiun

Owner: set to Piotr Jasiun
Status: confirmedassigned

comment:7 Changed 3 years ago by Piotr Jasiun

Status: assignedreview

Fix proposal in t/13883.

comment:8 Changed 3 years ago by Marek Lewandowski

Resolution: fixed
Status: reviewclosed

Merged to master with git:90c5bcd57.

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