3 var PlinnStylesCombo = function(editor
) {
5 this.title
= 'CSS Styles';
6 this.toolbar
= 'styles,10';
8 css
: [CKEDITOR
.skin
.getPath( 'editor' )].concat(editor
.config
.contentsCss
),
10 attributes
: {'aria-label': this.title
}
15 var PlinnStylePlugin = function() {
16 this.requires
= 'richcombo';
19 PlinnStylePlugin
.prototype.init = function(editor
) {
20 var psc
= new PlinnStylesCombo(editor
);
21 editor
.ui
.addRichCombo('PlinnStyles', psc
);
22 editor
.on('stylesSet', this.onStylesSet
);
25 PlinnStylePlugin
.prototype.onStylesSet = function(evt
) {
26 var stylesDefinitions
= evt
.data
.styles
;
27 if (!stylesDefinitions
) { return; }
33 CKEDITOR
.plugins
.add( 'plinn_styles', new PlinnStylePlugin());