From 96afa13bfef4663cd843c23f6523f832d48e9953 Mon Sep 17 00:00:00 2001 From: Jeffrey Chen <78434827+TCOTC@users.noreply.github.com> Date: Sat, 7 Mar 2026 10:58:07 +0800 Subject: [PATCH] :art: Remove the `colspan` and `rowspan` attributes from cell elements after splitting cells https://github.com/siyuan-note/siyuan/issues/17050#issue-3943488883 (#17094) --- app/src/menus/protyle.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 23eb26832..ef9afa3e9 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -2154,16 +2154,16 @@ export const tableMenu = (protyle: IProtyle, nodeElement: Element, cellElement: let colSpan = orgColSpan; while (colSpan > 0 && currentCellElement) { currentCellElement.classList.remove("fn__none"); - currentCellElement.colSpan = 1; - currentCellElement.rowSpan = 1; + currentCellElement.removeAttribute("colspan"); + currentCellElement.removeAttribute("rowspan"); currentCellElement = currentCellElement.nextElementSibling as HTMLTableCellElement; colSpan--; } currentRowElement = currentRowElement.nextElementSibling; rowSpan--; } - cellElement.rowSpan = 1; - cellElement.colSpan = 1; + cellElement.removeAttribute("colspan"); + cellElement.removeAttribute("rowspan"); if (cellElement.tagName === "TH") { let prueTrElement: HTMLElement; Array.from(nodeElement.querySelectorAll("thead tr")).find((item: HTMLElement) => {