mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-13 07:56:14 +01:00
🎨 Remove the colspan and rowspan attributes from cell elements after splitting cells https://github.com/siyuan-note/siyuan/issues/17050#issue-3943488883 (#17094)
This commit is contained in:
parent
990ff0ec5e
commit
96afa13bfe
1 changed files with 4 additions and 4 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue