src/js/wysiwygCommands/tableAddCol.js
function getNumberOfCols(wwe) {
  const selectionMgr = wwe.componentManager.getManager('tableSelection');
  const $selectedCells = selectionMgr.getSelectedCells();
  let length = 1;

  if ($selectedCells.length > 0) {
    const maxLength = $selectedCells.get(0).parentNode.querySelectorAll('td, th').length;
    length = Math.min(maxLength, $selectedCells.length);
  }

  return length;
}
function getNumberOfCols(wwe) {
  const selectionMgr = wwe.componentManager.getManager('tableSelection');
  const $selectedCells = selectionMgr.getSelectedCells();
  let length = 1;

  if ($selectedCells.length > 0) {
    const maxLength = $selectedCells.get(0).parentNode.querySelectorAll('td, th').length;
    length = Math.min(maxLength, $selectedCells.length);
  }

  return length;
}
function getNumberOfCols ( wwe ) { const selectionMgr = wwe . componentManager . getManager ( 'tableSelection' ) ; const $selectedCells = selectionMgr . getSelectedCells ( ) ; let length = 1 ; if ( $selectedCells . length > 0 ) { const maxLength = $selectedCells . get ( 0 ) . parentNode . querySelectorAll ( 'td, th' ) . length ; length = Math . min ( maxLength , $selectedCells . length ) ; } return length ; }
get number of selected cols
@param {WysiwygEditor} wwe - wysiwyg editor instance
@returns {number} - number of selected cols
@ignore
get number of selected cols