Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#9194 closed Bug (invalid)

stylesheetparser, using Generic Class defined in stylesheet, generic classes broken in Styles Dropdown

Reported by: JDub Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version:
Keywords: Cc: jw@…


I understand the stylesheetparser is designed to only work with classes assigned to elements.


div.normalText { ... }


span.normalText { ... }

However, I would like to use Generic Classes...


.normalText { ... }

The following code populates the styles dropdown with "generic" classes defined in an external stylesheet;


The Problem is that generic classes show up as broken in the Styles Dropdown. It shows the following format for each Dropdown Item;

< class="normalText">.normalText</>

See attached Image

I tried to edit the source and fix myself, but honestly I'm lost :)

I understand what is happening, it is using the element to generate the html in the dropdown... In this case the element is empty, thus the broken html tag above... My recommended solution is to use a <span> in the dropdown list when the element is empty.

Can this simple fix be added to the next release of ckeditor?

(It is very important to me that Generic classes be supported)


Attachments (1)

styles-dropdown.JPG (20.7 KB) - added by JDub 11 years ago.
Styles Dropdown broken when using generic class

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by JDub

Attachment: styles-dropdown.JPG added

Styles Dropdown broken when using generic class

comment:1 Changed 11 years ago by Jakub Ś

Keywords: stylesheetparser contentsCss stylesheetParser_skipSelectors stylesheetParser_validSelectors external stylesheet generic class generic selector styles dropdown styles combobox styles select box rich combo removed

comment:2 Changed 11 years ago by Jakub Ś

Resolution: invalid
Status: newclosed
Version: 3.6.5 (SVN - trunk)

CKEditor requires style to be bounded to a particular element. Currently there is no support for applying an arbitrary class as style to a random set of elements.

comment:3 Changed 11 years ago by JDub

Can we change this to a feature request then?

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