Opened 12 years ago

Closed 12 years ago

#9479 closed Bug (fixed)

Custom class name is not any more applied to button and menu item

Reported by: Frederico Caldeira Knabben Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 4.0
Component: UI : Toolbar Version: 4.0
Keywords: IBM Cc: Teresa Monahan

Description

This one has been reported by a customer. It is a backwards compatibility issue that needs to be investigated:

It is no longer possible to specify a classname when defining a button or menu item. We rely on this for adding relevant class names to toolbar menu buttons and their menu items.

In v3, the render function for CKEDITOR.ui.button and CKEDITOR.menuItem performed a check for this.className and appended its value to the classes for that ui element if present. The new implementation of render for these ui elements does not check if a className has been specified in the definition though so our classes are never applied.

Change History (4)

comment:1 Changed 12 years ago by Garry Yao

Component: GeneralUI : Toolbar
Status: newconfirmed
Version: 4.0 (GitHub - master)

comment:2 Changed 12 years ago by Garry Yao

Owner: set to Garry Yao
Status: confirmedreview

The reason that we removed the custom class application is because we have now a named UI item class name convention established in v4, to exemplify, with the bold button we now have the following classes:

  • cke_button - This class is to identify the ui type
  • cke_button_bold - This class is to identify the button name
  • cke_button_off - This class is to identify the button state

So individual buttons can be actually styled by following over the 2nd class name in the above list.

But in order to maintain compatibility, we'd still back port the v3 feature here. Review opened on t/9479 on both dev and test.

comment:3 Changed 12 years ago by Piotrek Koszuliński

Status: reviewreview_passed

Please remove unnecessary spaces before ":" in obj literals before masterising.

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

Resolution: fixed
Status: review_passedclosed
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