mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-20 02:50:58 +08:00
This commit is contained in:
parent
22a6c34d94
commit
fd42a78e25
@ -409,11 +409,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
table[contenteditable="false"] + .protyle-action__table {
|
||||
table[contenteditable="false"] + .protyle-action__table > .table__resize {
|
||||
display: none;
|
||||
}
|
||||
|
||||
table[contenteditable="true"] + .protyle-action__table {
|
||||
table + .protyle-action__table {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
height: 0;
|
||||
|
@ -811,7 +811,7 @@ export class WYSIWYG {
|
||||
documentSelf.onmousemove = (moveEvent: MouseEvent) => {
|
||||
let moveTarget: boolean | HTMLElement = moveEvent.target as HTMLElement;
|
||||
// table cell select
|
||||
if (!protyle.disabled && tableBlockElement && tableBlockElement.contains(moveTarget) &&
|
||||
if (tableBlockElement && tableBlockElement.contains(moveTarget) &&
|
||||
!hasClosestByClassName(tableBlockElement, "protyle-wysiwyg__embed")) {
|
||||
if (moveTarget.classList.contains("table__select")) {
|
||||
moveTarget.classList.add("fn__none");
|
||||
@ -1084,7 +1084,7 @@ export class WYSIWYG {
|
||||
});
|
||||
protyle.selectElement.classList.add("fn__none");
|
||||
protyle.selectElement.removeAttribute("style");
|
||||
if (!protyle.disabled && tableBlockElement) {
|
||||
if (tableBlockElement) {
|
||||
// @ts-ignore
|
||||
tableBlockElement.firstElementChild.style.webkitUserModify = "";
|
||||
const tableSelectElement = tableBlockElement.querySelector(".table__select") as HTMLElement;
|
||||
@ -1093,6 +1093,7 @@ export class WYSIWYG {
|
||||
getSelection().getRangeAt(0).collapse(false);
|
||||
}
|
||||
window.siyuan.menus.menu.remove();
|
||||
if (!protyle.disabled) {
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.mergeCell,
|
||||
click: () => {
|
||||
@ -1294,6 +1295,7 @@ export class WYSIWYG {
|
||||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||
}
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
icon: "iconCopy",
|
||||
accelerator: "⌘C",
|
||||
@ -1305,6 +1307,7 @@ export class WYSIWYG {
|
||||
}
|
||||
}
|
||||
}).element);
|
||||
if (!protyle.disabled) {
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
icon: "iconCut",
|
||||
accelerator: "⌘X",
|
||||
@ -1341,6 +1344,7 @@ export class WYSIWYG {
|
||||
}
|
||||
}
|
||||
}).element);
|
||||
}
|
||||
window.siyuan.menus.menu.popup({x: mouseUpEvent.clientX - 8, y: mouseUpEvent.clientY - 16});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user