Professional Documents
Culture Documents
All rights
reserved. 3 For licensing, see LICENSE.html or
http://ckeditor.com/license 4 */ 5 6 (function() 7 { 8 function
addCombo( editor, comboName, styleType, lang, entries, defaultLabel,
styleDefinition ) 9 { 10 var config = editor.config; 11
12 // Gets the list of fonts from the settings. 13 var name
19 { 20 var parts = names[ i ]; 21 22
vars[ styleType ] = values[ i ] = parts[ 1 ]
|| name; 30 31 styles[ name ] = new
CKEDITOR.style( styleDefinition, vars ); 32
styles[ name ]._.definition.name = name; 33 }
34 else 35
names.splice( i--, 1 ); 36 } 37 38
editor.ui.addRichCombo( comboName, 39 { 40
44 { 45
css : editor.skin.editor.css.concat( config.contentsCss ), 46
multiSelect : false, 47
this.startGroup( lang.panelTitle ); 53 54 f
this.add( name,
styles[ name ].buildPreview(), name ); 60 } 61
68 var style = styles[ value ]; 69
70 if ( this.getValue() == value ) 71