﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
9194	stylesheetparser, using Generic Class defined in stylesheet, generic classes broken in Styles Dropdown	JDub		"I understand the stylesheetparser is designed to only work with classes assigned to elements.

Example;
{{{
div.normalText { ... }
}}}
OR;
{{{
span.normalText { ... }
}}}

However, I would like to use Generic Classes...

Example;
{{{
.normalText { ... }
}}}


The following code populates the styles dropdown with ""generic"" classes defined in an external stylesheet;

{{{
$('#myTextarea').ckeditor({
    extraPlugins:'stylesheetparser',
    stylesheetParser_skipSelectors:/(^body\.)/i,
    stylesheetParser_validSelectors:/\.\w+/,
    contentsCss:'/css/styles.css',
    stylesSet:[],
    toolbar:[['Bold','Italic','Underline','-','Styles','FontSize']]
});
}}}

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)

Thanks!"	Bug	closed	Normal		Core : Styles		invalid		jw@…
