import { ReactEditor } from "slate-react";
import { Transforms, Editor } from "slate";
const selectTableCellContents = (editor, table, rowIndex, columnIndex) => {
  if (!Array.isArray(table)) {
    table = ReactEditor.findPath(editor, table);
  }
  Transforms.select(editor, {
    anchor: Editor.start(editor, [...table, rowIndex, columnIndex]),
    focus: Editor.end(editor, [...table, rowIndex, columnIndex])
  });
};
const getTableCellCoordinates = (editor, element) => {
  const cellPath = ReactEditor.findPath(editor, element);
  return cellPath.slice(-2);
};
export {
  getTableCellCoordinates,
  selectTableCellContents
};
//# sourceMappingURL=TableElementSelection.js.map
