X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ffont%2Fplugin.js;h=70f3d9d698f7fc60a5db0515e2d27e9418899eda;hb=059b4c2fef02528bf1af189f7996e80652faddfb;hp=1d411a833ae5b61a40555dfe5373498aa8d3d101;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/font/plugin.js b/_source/plugins/font/plugin.js index 1d411a8..70f3d9d 100644 --- a/_source/plugins/font/plugin.js +++ b/_source/plugins/font/plugin.js @@ -17,27 +17,33 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var styles = {}; for ( var i = 0 ; i < names.length ; i++ ) { - var vars = {}; - var parts = names[ i ].split( '/' ); + var parts = names[ i ]; - var name = names[ i ] = parts[ 0 ]; - vars[ styleType ] = values[ i ] = parts[ 1 ] || name; + if ( parts ) + { + parts = parts.split( '/' ); + + var vars = {}, + name = names[ i ] = parts[ 0 ]; - styles[ name ] = new CKEDITOR.style( styleDefinition, vars ); + vars[ styleType ] = values[ i ] = parts[ 1 ] || name; + + styles[ name ] = new CKEDITOR.style( styleDefinition, vars ); + } + else + names.splice( i--, 1 ); } editor.ui.addRichCombo( comboName, { label : lang.label, title : lang.panelTitle, - voiceLabel : lang.voiceLabel, className : 'cke_' + ( styleType == 'size' ? 'fontSize' : 'font' ), - multiSelect : false, - panel : { css : editor.skin.editor.css.concat( config.contentsCss ), - voiceLabel : lang.panelVoiceLabel + multiSelect : false, + attributes : { 'aria-label' : lang.panelTitle } }, init : function()