Lexical: Added table column cut/copy/paste support

This commit is contained in:
Dan Brown
2024-08-22 13:28:30 +01:00
parent 8a13a9df80
commit 1ebb0f8c93
8 changed files with 273 additions and 40 deletions

View File

@ -168,12 +168,12 @@ export function $mergeTableCellsInSelection(selection: TableSelection): void {
const fixedToX = selectionShape.toX + ((headCell.getColSpan() || 1) - 1);
const fixedToY = selectionShape.toY + ((headCell.getRowSpan() || 1) - 1);
const mergeCells = tableMap.getCellsInRange(
selectionShape.fromX,
selectionShape.fromY,
fixedToX,
fixedToY,
);
const mergeCells = tableMap.getCellsInRange({
fromX: selectionShape.fromX,
fromY: selectionShape.fromY,
toX: fixedToX,
toY: fixedToY,
});
if (mergeCells.length === 0) {
return;