|
@@ -236,6 +236,7 @@ export const removeRowOrColumns = (
|
|
|
minY: startRow,
|
|
minY: startRow,
|
|
|
maxY: endRow,
|
|
maxY: endRow,
|
|
|
} = selection.normalized()
|
|
} = selection.normalized()
|
|
|
|
|
+ const borderTheme = table.getBorderTheme()
|
|
|
const changes: { from: number; to: number; insert: string }[] = []
|
|
const changes: { from: number; to: number; insert: string }[] = []
|
|
|
const specification = view.state.sliceDoc(
|
|
const specification = view.state.sliceDoc(
|
|
|
positions.columnDeclarations.from,
|
|
positions.columnDeclarations.from,
|
|
@@ -259,10 +260,17 @@ export const removeRowOrColumns = (
|
|
|
for (let row = startRow; row <= endRow; row++) {
|
|
for (let row = startRow; row <= endRow; row++) {
|
|
|
if (selection.isRowSelected(row, table)) {
|
|
if (selection.isRowSelected(row, table)) {
|
|
|
const rowPosition = positions.rowPositions[row]
|
|
const rowPosition = positions.rowPositions[row]
|
|
|
|
|
+ let insert = ''
|
|
|
|
|
+ if (
|
|
|
|
|
+ row === numberOfRows - 1 &&
|
|
|
|
|
+ borderTheme === BorderTheme.FULLY_BORDERED
|
|
|
|
|
+ ) {
|
|
|
|
|
+ insert = '\\hline'
|
|
|
|
|
+ }
|
|
|
changes.push({
|
|
changes.push({
|
|
|
from: rowPosition.from,
|
|
from: rowPosition.from,
|
|
|
to: rowPosition.to,
|
|
to: rowPosition.to,
|
|
|
- insert: '',
|
|
|
|
|
|
|
+ insert,
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
for (let cell = startCell; cell <= endCell; ) {
|
|
for (let cell = startCell; cell <= endCell; ) {
|