/*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\r
\r
\r
var elementPath = new CKEDITOR.dom.elementPath( selection.getStartElement() );\r
\r
- if ( style.type == CKEDITOR.STYLE_INLINE && style.checkActive( elementPath ) )\r
- style.remove( editor.document );\r
- else if ( style.type == CKEDITOR.STYLE_OBJECT && style.checkActive( elementPath ) )\r
- style.remove( editor.document );\r
- else\r
- style.apply( editor.document );\r
+ style[ style.checkActive( elementPath ) ? 'remove' : 'apply' ]( editor.document );\r
\r
editor.fire( 'saveSnapshot' );\r
},\r