Ticket #5246 (closed Bug: fixed)
3.2 Bug : CKEDITOR.addStylesSet no longer works....
| Reported by: | bensinclair1 | Owned by: | |
|---|---|---|---|
| Priority: | High | Milestone: | CKEditor 3.2 |
| Component: | General | Version: | 3.2 |
| Keywords: | Confirmed | Cc: |
Description
I had a custom style set added to my 3.1 install... Now that I upgraded to 3.2 it's no longer working. It just shows a blank style drop down (see attachment).
I have added the following code to CKEDITOR.editorConfig = function( config ):
config.stylesCombo_stylesSet = 'custom_styles';
And here is my custom style set:
/* Custom style settings.
Added the styles here so they can be modified using action hooks.
*/
CKEDITOR.addStylesSet( 'custom_styles', [
/* Block Styles */
/* Inline Styles */
{ name : 'Marker: Yellow' , element : 'span', styles : { 'background-color' : 'Yellow' } }, { name : 'Marker: Green' , element : 'span', styles : { 'background-color' : 'Lime' } },
{ name : 'Big' , element : 'big' }, { name : 'Small' , element : 'small' }, { name : 'Typewriter' , element : 'tt' },
{ name : 'Computer Code' , element : 'code' }, { name : 'Keyboard Phrase' , element : 'kbd' }, { name : 'Sample Text' , element : 'samp' }, { name : 'Variable' , element : 'var' },
{ name : 'Deleted Text' , element : 'del' }, { name : 'Inserted Text' , element : 'ins' },
{ name : 'Cited Work' , element : 'cite' }, { name : 'Inline Quotation' , element : 'q' },
{ name : 'Language: RTL' , element : 'span', attributes : { 'dir' : 'rtl' } }, { name : 'Language: LTR' , element : 'span', attributes : { 'dir' : 'ltr' } },
/* Object Styles */
{
name : 'Image on Left', element : 'img', attributes : {
'style' : 'padding: 5px; margin-right: 5px', 'border' : '2', 'align' : 'left'
}
},
{
name : 'Image on Right', element : 'img', attributes : {
'style' : 'padding: 5px; margin-left: 5px', 'border' : '2', 'align' : 'right'
}
}
]);
Like I said, it was working in 3.1. Hopefully there is a fix for it in the meantime because I would really like to keep using 3.2 :)
Keep up the great work!
Attachments
Change History
Changed 2 years ago by bensinclair1
-
attachment
Screen shot 2010-02-26 at 12.30.40 PM.png
added
comment:1 Changed 2 years ago by bensinclair1
Some more info for you... Firebug is coming up saying
CKEDITOR.addStylesSet is not a function
comment:2 Changed 2 years ago by fredck
- Keywords Confirmed added
- Status changed from new to closed
- Resolution set to fixed
The API has been modified for the styles loading for the 3.2. I've requested to maintain backwards compatibility, but it looks like this have not been implemented in the proper way.
I've fixed it with [5198] for the urgent 3.2 "re-release" will do today. But, you can also make it work by replacing CKEDITOR.addStylesSet with CKEDITOR.stylesSet.add.

This is what it looks like when I have a custom style set