X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fstylescombo%2Fplugin.js;h=d2f8eb3efaa7c396a9c2b291b2898c0add803323;hp=fb44d5c2e472abb0038345d610cc7528e1d69c07;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hpb=9afde8772159bd3436f1f5b7862960307710ae5a diff --git a/_source/plugins/stylescombo/plugin.js b/_source/plugins/stylescombo/plugin.js index fb44d5c..d2f8eb3 100644 --- a/_source/plugins/stylescombo/plugin.js +++ b/_source/plugins/stylescombo/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -106,12 +106,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var elementPath = new CKEDITOR.dom.elementPath( selection.getStartElement() ); - if ( style.type == CKEDITOR.STYLE_INLINE && style.checkActive( elementPath ) ) - style.remove( editor.document ); - else if ( style.type == CKEDITOR.STYLE_OBJECT && style.checkActive( elementPath ) ) - style.remove( editor.document ); - else - style.apply( editor.document ); + style[ style.checkActive( elementPath ) ? 'remove' : 'apply' ]( editor.document ); editor.fire( 'saveSnapshot' ); },