mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-26 08:54:07 +01:00
This commit is contained in:
parent
4db338c1b0
commit
d5c2093426
2 changed files with 5 additions and 3 deletions
|
|
@ -1033,12 +1033,14 @@ export const tableMenu = (protyle: IProtyle, nodeElement: Element, cellElement:
|
|||
}
|
||||
});
|
||||
}
|
||||
if (!hasNone || (hasNone && !hasRowSpan && hasColSpan) || colIsPure) {
|
||||
if ((cellElement.parentElement.parentElement.tagName !== "THEAD" &&
|
||||
((!hasNone && !hasRowSpan) || (hasNone && !hasRowSpan && hasColSpan))) || colIsPure) {
|
||||
menus.push({
|
||||
type: "separator"
|
||||
});
|
||||
}
|
||||
if ((!hasNone && !hasRowSpan) || (hasNone && !hasRowSpan && hasColSpan)) {
|
||||
if (cellElement.parentElement.parentElement.tagName !== "THEAD" &&
|
||||
((!hasNone && !hasRowSpan) || (hasNone && !hasRowSpan && hasColSpan))) {
|
||||
menus.push({
|
||||
icon: "iconDeleteRow",
|
||||
label: window.siyuan.languages["delete-row"],
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ export const insertColumn = (protyle: IProtyle, nodeElement: Element, cellElemen
|
|||
};
|
||||
|
||||
export const deleteRow = (protyle: IProtyle, range: Range, cellElement: HTMLElement, nodeElement: Element) => {
|
||||
if (cellElement.tagName === "TD") {
|
||||
if (cellElement.parentElement.parentElement.tagName !== "THEAD") {
|
||||
range.insertNode(document.createElement("wbr"));
|
||||
const html = nodeElement.outerHTML;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue