mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-14 04:38:50 +01:00
🚨
This commit is contained in:
parent
56e64c9b7e
commit
ca6955dc31
3 changed files with 46 additions and 46 deletions
|
|
@ -209,7 +209,7 @@ const processTable = (range: Range, html: string, protyle: IProtyle, blockElemen
|
|||
const scrollLeft = blockElement.firstElementChild.scrollLeft;
|
||||
const tableSelectElement = blockElement.querySelector(".table__select") as HTMLElement;
|
||||
let index = 0;
|
||||
const matchCellsElement: HTMLTableCellElement[] = []
|
||||
const matchCellsElement: HTMLTableCellElement[] = [];
|
||||
blockElement.querySelectorAll("th, td").forEach((item: HTMLTableCellElement) => {
|
||||
if (!item.classList.contains("fn__none") &&
|
||||
item.offsetLeft + 6 > tableSelectElement.offsetLeft + scrollLeft && item.offsetLeft + item.clientWidth - 6 < tableSelectElement.offsetLeft + scrollLeft + tableSelectElement.clientWidth &&
|
||||
|
|
@ -227,7 +227,7 @@ const processTable = (range: Range, html: string, protyle: IProtyle, blockElemen
|
|||
if (matchIndex === matchCellsElement.length - 1) {
|
||||
setLastNodeRange(item, range, false);
|
||||
}
|
||||
})
|
||||
});
|
||||
range.collapse(false);
|
||||
updateTransaction(protyle, blockElement.getAttribute("data-node-id"), blockElement.outerHTML, oldHTML);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue