code: function deleteTable() {
          function placeCaretInCell(cell) {
            editor.selection.select(cell, true);
            editor.selection.collapse(true);
          }
  
          function clearCell(cell) {
            editor.$(cell).empty();
            Utils.paddCell(cell);
          }
  
          editor.on('keydown', function (e) {
            if ((e.keyCode == VK.DELETE || e.keyCode == VK.BACKSPACE) && !e.isDefaultPrevented()) {
              var table, tableCells, selectedTableCells, cell;
  
              table = editor.dom.getParent(editor.selection.getStart(), 'table');
              if (table) {
                tableCells = editor.dom.select('td,th', table);
                selectedTableCells = Tools.grep(tableCells, function (cell) {
                  return !!editor.dom.getAttrib(cell, 'data-mce-selected');
                });
  
                if (selectedTableCells.length === 0) {
                  // If caret is within an empty table cell then empty it for real
                  cell = editor.dom.getParent(editor.selection.getStart(), 'td,th');
                  if (editor.selection.isCollapsed() && cell && editor.dom.isEmpty(cell)) {
                    e.preventDefault();
                    clearCell(cell);
                    placeCaretInCell(cell);
                  }
  
                  return;
                }
  
                e.preventDefault();
  
                editor.undoManager.transact(function () {
                  if (tableCells.length == selectedTableCells.length) {
                    editor.execCommand('mceTableDelete');
                  } else {
                    Tools.each(selectedTableCells, clearCell);
                    placeCaretInCell(selectedTableCells[0]);
                  }
                });
              }
            }
          });
        }
docs: Delete table if all cells are selected.