/*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
vars[ styleType ] = values[ i ] = parts[ 1 ] || name;\r
\r
styles[ name ] = new CKEDITOR.style( styleDefinition, vars );\r
+ styles[ name ]._.definition.name = name;\r
}\r
else\r
names.splice( i--, 1 );\r
var name = names[ i ];\r
\r
// Add the tag entry to the panel list.\r
- this.add( name, '<span style="font-' + styleType + ':' + values[ i ] + '">' + name + '</span>', name );\r
+ this.add( name, styles[ name ].buildPreview(), name );\r
}\r
},\r
\r
// the styles.\r
for ( var value in styles )\r
{\r
- if ( styles[ value ].checkElementRemovable( element, true ) )\r
+ if ( styles[ value ].checkElementMatch( element, true ) )\r
{\r
if ( value != currentValue )\r
this.setValue( value );\r