X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fplugins%2Fshowborders%2Fplugin.js;h=443a7754fb4c3a819e7d19a1b3d3d34e3703d970;hb=refs%2Ftags%2Fv3.6.2;hp=921920646219d406d29a82a07085841dd199cf75;hpb=e371ddf8abcb89013e20e6d0dd746adec344d0e5;p=ckeditor.git diff --git a/_source/plugins/showborders/plugin.js b/_source/plugins/showborders/plugin.js index 9219206..443a775 100644 --- a/_source/plugins/showborders/plugin.js +++ b/_source/plugins/showborders/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 */ @@ -18,7 +18,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license ( CKEDITOR.env.ie6Compat ? [ '.%1 table.%2,', - '.%1 table.%2 td, .%1 table.%2 th,', + '.%1 table.%2 td, .%1 table.%2 th', '{', 'border : #d3d3d3 1px dotted', '}' @@ -40,6 +40,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { preserveState : true, editorFocus : false, + readOnly: 1, exec : function ( editor ) { @@ -49,8 +50,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license refresh : function( editor ) { - var funcName = ( this.state == CKEDITOR.TRISTATE_ON ) ? 'addClass' : 'removeClass'; - editor.document.getBody()[ funcName ]( 'cke_show_borders' ); + if ( editor.document ) + { + var funcName = ( this.state == CKEDITOR.TRISTATE_ON ) ? 'addClass' : 'removeClass'; + editor.document.getBody()[ funcName ]( 'cke_show_borders' ); + } } }; @@ -111,7 +115,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license cssClass = attributes[ 'class' ], border = parseInt( attributes.border, 10 ); - if ( !border || border <= 0 ) + if ( ( !border || border <= 0 ) && ( !cssClass || cssClass.indexOf( showBorderClassName ) == -1 ) ) attributes[ 'class' ] = ( cssClass || '' ) + ' ' + showBorderClassName; } } @@ -194,6 +198,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license /** * Whether to automatically enable the "show borders" command when the editor loads. + * (ShowBorders in FCKeditor) + * @name CKEDITOR.config.startupShowBorders * @type Boolean * @default true * @example