X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fplugins%2Ftable%2Fdialogs%2Ftable.js;fp=_source%2Fplugins%2Ftable%2Fdialogs%2Ftable.js;h=6a082d25236bdc5db6fef0253952c1f90607bb0f;hb=7cd80714081a8ffdf4a1a8d2c72f120ed5ef3d6d;hp=461e36e64c7c0a96042d9f82a489b9f270a6e6f6;hpb=8761695d9b70afe75905deaac88f78c1f8aeb32d;p=ckeditor.git diff --git a/_source/plugins/table/dialogs/table.js b/_source/plugins/table/dialogs/table.js index 461e36e..6a082d2 100644 --- a/_source/plugins/table/dialogs/table.js +++ b/_source/plugins/table/dialogs/table.js @@ -174,16 +174,19 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Set the width and height. var styles = []; if ( info.txtHeight ) - styles.push( 'height:' + info.txtHeight + 'px' ); + table.setStyle( 'height', CKEDITOR.tools.cssLength( info.txtHeight ) ); + else + table.removeStyle( 'height' ); + if ( info.txtWidth ) { var type = info.cmbWidthType || 'pixels'; - styles.push( 'width:' + info.txtWidth + ( type == 'pixels' ? 'px' : '%' ) ); + table.setStyle( 'width', info.txtWidth + ( type == 'pixels' ? 'px' : '%' ) ); } - styles = styles.join( ';' ); - if ( styles ) - table.$.style.cssText = styles; else + table.removeStyle( 'width' ); + + if( !table.getAttribute( 'style' ) ) table.removeAttribute( 'style' ); }