Index: _source/plugins/tabletools/dialogs/tableCell.js =================================================================== --- _source/plugins/tabletools/dialogs/tableCell.js (revision 3477) +++ _source/plugins/tabletools/dialogs/tableCell.js Thu Jun 25 12:15:34 CST 2009 @@ -311,20 +311,6 @@ } ] } - ], - onShow : function() - { - // Get the selected table cell. - var startElement = editor.getSelection().getStartElement(); - this.cell = startElement.getAscendant( 'td', true ) || startElement.getAscendant( 'th', true ); - - // Call setupContent(). - this.setupContent( this.cell ); - }, - onOk : function() - { - // Call commitContent(). - this.commitContent( this.cell ); - } + ] }; } ); Index: _source/plugins/tabletools/plugin.js =================================================================== --- _source/plugins/tabletools/plugin.js (revision 3712) +++ _source/plugins/tabletools/plugin.js Thu Jun 25 12:16:52 CST 2009 @@ -424,7 +424,26 @@ editor.addCommand( 'cellProperties', new CKEDITOR.dialogCommand( 'cellProperties' ) ); CKEDITOR.dialog.add( 'cellProperties', this.path + 'dialogs/tableCell.js' ); + // Initialize table cell properties dialog. + CKEDITOR.on( 'dialogDefinition', function( evt ){ + if ( evt.data.name == 'cellProperties' ) + { + var definition = evt.data.definition; + definition.onShow = function() + { + this.cells = getSelectedCells( editor.getSelection() ); + this.setupContent( this.cells[ 0 ] ); + }; + definition.onOk = function() + { + var cells = this.cells + for ( var i = 0 ; i < cells.length ; i++ ) + this.commitContent( cells[ i ] ); + }; + } + } ); + editor.addCommand( 'tableDelete', { exec : function( editor ) @@ -544,12 +563,11 @@ getItems : function() { var cells = getSelectedCells( editor.getSelection() ); - return { tablecell_insertBefore : CKEDITOR.TRISTATE_OFF, tablecell_insertAfter : CKEDITOR.TRISTATE_OFF, tablecell_delete : CKEDITOR.TRISTATE_OFF, - tablecell_properties : cells.length == 1 ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED + tablecell_properties : cells.length > 0 ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED }; } }, Index: CHANGES.html =================================================================== --- CHANGES.html (revision 3770) +++ CHANGES.html Thu Jun 25 12:18:52 CST 2009 @@ -46,6 +46,8 @@