// toolbar
config.toolbar = [
- { name: 'styles', items : [ 'Styles','Format', 'Font', 'FontSize' ] },
+ { name: 'styles', items : [ 'PlinnStyles','Format', 'Font', 'FontSize' ] },
{ name: 'colors', items : [ 'TextColor', 'BGColor' ] },
{ name: 'document', items : [ 'Maximize', 'ShowBlocks', 'Source'] },
{ name: 'editing', items : [ 'Find','Replace', '-', 'SelectAll'] },
config.filebrowserWindowWidth = 801;
config.attachmentBrowserConnectorUrl = CKEDITOR.basePath + 'plugins/plinn_image/connectors/plinn/connector';
config.imageMaxDefaultDimension = 500 ; // image inserted will be cropped at this size.
- config.extraPlugins = 'plinn_image,codemirror';
+ config.extraPlugins = 'plinn_image,plinn_styles,codemirror';
config.stylesSet = 'plinn_styles:' + CKEDITOR.basePath + 'plinn_ckeditor_styles.js';
};
\ No newline at end of file
--- /dev/null
+( function() {
+
+var PlinnStylesCombo = function(editor) {
+ this.label = 'Styles';
+ this.title = 'CSS Styles';
+ this.toolbar = 'styles,10';
+ this.panel = {
+ css : [CKEDITOR.skin.getPath( 'editor' )].concat(editor.config.contentsCss),
+ multiSelect : true,
+ attributes : {'aria-label': this.title}
+ };
+};
+
+
+var PlinnStylePlugin = function() {
+ this.requires = 'richcombo';
+};
+
+PlinnStylePlugin.prototype.init = function(editor) {
+ var psc = new PlinnStylesCombo(editor);
+ editor.ui.addRichCombo('PlinnStyles', psc);
+ editor.on('stylesSet', this.onStylesSet);
+};
+
+PlinnStylePlugin.prototype.onStylesSet = function(evt) {
+ var stylesDefinitions = evt.data.styles;
+ if (!stylesDefinitions) { return; }
+
+};
+
+
+// main
+CKEDITOR.plugins.add( 'plinn_styles', new PlinnStylePlugin());
+
+} )();