X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ffont%2Fplugin.js;h=6248e68b3aff04d81d92ad1ba462f20cd8ccfd83;hb=refs%2Ftags%2Fv3.6.6;hp=02e86df9e2fc3e5747e9b00dac063110f405db7e;hpb=c6e377a02b54abc07129d72b632763c727476a15;p=ckeditor.git diff --git a/_source/plugins/font/plugin.js b/_source/plugins/font/plugin.js index 02e86df..6248e68 100644 --- a/_source/plugins/font/plugin.js +++ b/_source/plugins/font/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -29,6 +29,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license vars[ styleType ] = values[ i ] = parts[ 1 ] || name; styles[ name ] = new CKEDITOR.style( styleDefinition, vars ); + styles[ name ]._.definition.name = name; } else names.splice( i--, 1 ); @@ -38,14 +39,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { 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() @@ -57,7 +56,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var name = names[ i ]; // Add the tag entry to the panel list. - this.add( name, '' + name + '', name ); + this.add( name, styles[ name ].buildPreview(), name ); } }, @@ -94,7 +93,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // the styles. for ( var value in styles ) { - if ( styles[ value ].checkElementRemovable( element, true ) ) + if ( styles[ value ].checkElementMatch( element, true ) ) { if ( value != currentValue ) this.setValue( value );