Opened 5 years ago

Last modified 5 years ago

#12127 confirmed New Feature

Wrong behavior when applying object styles - existing inline styles are removed

Reported by: Wiktor Walc Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 4.0
Keywords: Cc:

Description

  1. Go to http://ckeditor.com/latest/samples/replacebycode.html
  2. Press "New Page" button
  3. Insert a table
  4. Apply "Borderless Table" style

Result

Width definition is removed (a side effect i that now it is hard to insert content into cells).

Expected result

The following style definition should only add and/or override styles that are defined in the styles object. Other styles that were applied already to a table shouldn't be lost.

{
    name: 'Borderless Table',
    element: 'table',
    styles: {
        'border-style': 'hidden',
        'background-color': '#E6E6FA' 
    } 
},

If my intention is to remove 'width' when applying this style, I should be able to define it as width: '' or width: null etc.

Change History (3)

comment:1 Changed 5 years ago by Wiktor Walc

Version: 4.0

comment:2 Changed 5 years ago by Wiktor Walc

Type: BugNew Feature

Actually, so far this has been done by design, so the proposed way of handling styles in ticket is rather a new feature than a bug.

comment:3 Changed 5 years ago by Jakub Ś

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