From 75247dfa43f7a7780fecf47bbbe654e3b25dbf3c Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Wed, 10 Jan 2024 12:49:37 +0800 Subject: [PATCH] fix: resolve the issue of reduced row count after merging cells --- .../packages/editor/src/extensions/table/table-row.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/console/packages/editor/src/extensions/table/table-row.ts b/console/packages/editor/src/extensions/table/table-row.ts index f2d79a66ba..8f16a9ab86 100644 --- a/console/packages/editor/src/extensions/table/table-row.ts +++ b/console/packages/editor/src/extensions/table/table-row.ts @@ -2,6 +2,16 @@ import { TableRow as BuiltInTableRow } from "@tiptap/extension-table-row"; const TableRow = BuiltInTableRow.extend({ allowGapCursor: false, + + addAttributes() { + return { + ...this.parent?.(), + style: { + default: "height: 60px;", + parseHTML: (element) => element.getAttribute("style"), + }, + }; + }, }); export default TableRow;