#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@… |
Description
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!
Attachments (1)
Change History (4)
Changed 12 years ago by
Attachment: | styles-dropdown.JPG added |
---|
comment:1 Changed 12 years ago by
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 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
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.
Styles Dropdown broken when using generic class