Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.6.4
[ckeditor.git]
/
_source
/
plugins
/
font
/
plugin.js
diff --git
a/_source/plugins/font/plugin.js
b/_source/plugins/font/plugin.js
index
88aa38f
..
268f2ee
100644
(file)
--- a/
_source/plugins/font/plugin.js
+++ b/
_source/plugins/font/plugin.js
@@
-1,5
+1,5
@@
/*
\r
/*
\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
\r
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
\r
For licensing, see LICENSE.html or http://ckeditor.com/license
\r
*/
\r
\r
For licensing, see LICENSE.html or http://ckeditor.com/license
\r
*/
\r
\r
@@
-17,27
+17,34
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
var styles = {};
\r
for ( var i = 0 ; i < names.length ; i++ )
\r
{
\r
var styles = {};
\r
for ( var i = 0 ; i < names.length ; i++ )
\r
{
\r
- var vars = {};
\r
- var parts = names[ i ].split( '/' );
\r
+ var parts = names[ i ];
\r
\r
\r
- var name = names[ i ] = parts[ 0 ];
\r
- vars[ styleType ] = values[ i ] = parts[ 1 ] || name;
\r
+ if ( parts )
\r
+ {
\r
+ parts = parts.split( '/' );
\r
+
\r
+ var vars = {},
\r
+ name = names[ i ] = parts[ 0 ];
\r
\r
\r
- styles[ name ] = new CKEDITOR.style( styleDefinition, vars );
\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
}
\r
\r
editor.ui.addRichCombo( comboName,
\r
{
\r
label : lang.label,
\r
title : lang.panelTitle,
\r
}
\r
\r
editor.ui.addRichCombo( comboName,
\r
{
\r
label : lang.label,
\r
title : lang.panelTitle,
\r
- voiceLabel : lang.voiceLabel,
\r
className : 'cke_' + ( styleType == 'size' ? 'fontSize' : 'font' ),
\r
className : 'cke_' + ( styleType == 'size' ? 'fontSize' : 'font' ),
\r
- multiSelect : false,
\r
-
\r
panel :
\r
{
\r
panel :
\r
{
\r
- css : [ config.contentsCss, CKEDITOR.getUrl( editor.skinPath + 'editor.css' ) ],
\r
- voiceLabel : lang.panelVoiceLabel
\r
+ css : editor.skin.editor.css.concat( config.contentsCss ),
\r
+ multiSelect : false,
\r
+ attributes : { 'aria-label' : lang.panelTitle }
\r
},
\r
\r
init : function()
\r
},
\r
\r
init : function()
\r
@@
-49,7
+56,7
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
var name = names[ i ];
\r
\r
// Add the tag entry to the panel list.
\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
}
\r
},
\r
\r
@@
-86,7
+93,7
@@
For licensing, see LICENSE.html or http://ckeditor.com/license
// the styles.
\r
for ( var value in styles )
\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
{
\r
if ( value != currentValue )
\r
this.setValue( value );
\r