X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ftabletools%2Fplugin.js;h=05b5e13cac3a837c54cd2948246fb9f853b7a8da;hb=a272c66d841421f8bf933c16535bdcde1c4649fc;hp=3c4fd01c3e453f15243129669e69133593010098;hpb=6e682412d5cc0dfaedb376482e585bf2989c6863;p=ckeditor.git diff --git a/_source/plugins/tabletools/plugin.js b/_source/plugins/tabletools/plugin.js index 3c4fd01..05b5e13 100644 --- a/_source/plugins/tabletools/plugin.js +++ b/_source/plugins/tabletools/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -275,15 +275,18 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { cloneCol.push( map[ i ][ colIndex ] ); var nextCell = insertBefore ? map[ i ][ colIndex - 1 ] : map[ i ][ colIndex + 1 ]; - nextCell && nextCol.push( nextCell ); + nextCol.push( nextCell ); } for ( i = 0; i < height; i++ ) { var cell; + + if ( !cloneCol[ i ] ) + continue; + // Check whether there's a spanning column here, do not break it. if ( cloneCol[ i ].colSpan > 1 - && nextCol.length && nextCol[ i ] == cloneCol[ i ] ) { cell = cloneCol[ i ]; @@ -771,7 +774,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEDITOR.plugins.tabletools = { - requires : [ 'table', 'dialog', 'contextmenu' ], + requires : [ 'table', 'dialog' ], init : function( editor ) {