Ticket #5246 (closed Bug: fixed)

Opened 6 months ago

Last modified 6 months ago

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

Screen shot 2010-02-26 at 12.30.40 PM.png Download (36.3 KB) - added by bensinclair1 6 months ago.
This is what it looks like when I have a custom style set

Change History

Changed 6 months ago by bensinclair1

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

Changed 6 months ago by bensinclair1

Some more info for you... Firebug is coming up saying

CKEDITOR.addStylesSet is not a function

Changed 6 months 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.

Changed 6 months ago by fredck

  • milestone set to CKEditor 3.2

This one has been included in the "re-release" we did today. Please download the 3.2 again.

Note: See TracTickets for help on using tickets.