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;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
table[contenteditable="true"] + .protyle-action__table {
|
table + .protyle-action__table {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
height: 0;
|
height: 0;
|
||||||
|
@ -811,7 +811,7 @@ export class WYSIWYG {
|
|||||||
documentSelf.onmousemove = (moveEvent: MouseEvent) => {
|
documentSelf.onmousemove = (moveEvent: MouseEvent) => {
|
||||||
let moveTarget: boolean | HTMLElement = moveEvent.target as HTMLElement;
|
let moveTarget: boolean | HTMLElement = moveEvent.target as HTMLElement;
|
||||||
// table cell select
|
// table cell select
|
||||||
if (!protyle.disabled && tableBlockElement && tableBlockElement.contains(moveTarget) &&
|
if (tableBlockElement && tableBlockElement.contains(moveTarget) &&
|
||||||
!hasClosestByClassName(tableBlockElement, "protyle-wysiwyg__embed")) {
|
!hasClosestByClassName(tableBlockElement, "protyle-wysiwyg__embed")) {
|
||||||
if (moveTarget.classList.contains("table__select")) {
|
if (moveTarget.classList.contains("table__select")) {
|
||||||
moveTarget.classList.add("fn__none");
|
moveTarget.classList.add("fn__none");
|
||||||
@ -1084,7 +1084,7 @@ export class WYSIWYG {
|
|||||||
});
|
});
|
||||||
protyle.selectElement.classList.add("fn__none");
|
protyle.selectElement.classList.add("fn__none");
|
||||||
protyle.selectElement.removeAttribute("style");
|
protyle.selectElement.removeAttribute("style");
|
||||||
if (!protyle.disabled && tableBlockElement) {
|
if (tableBlockElement) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
tableBlockElement.firstElementChild.style.webkitUserModify = "";
|
tableBlockElement.firstElementChild.style.webkitUserModify = "";
|
||||||
const tableSelectElement = tableBlockElement.querySelector(".table__select") as HTMLElement;
|
const tableSelectElement = tableBlockElement.querySelector(".table__select") as HTMLElement;
|
||||||
@ -1093,6 +1093,7 @@ export class WYSIWYG {
|
|||||||
getSelection().getRangeAt(0).collapse(false);
|
getSelection().getRangeAt(0).collapse(false);
|
||||||
}
|
}
|
||||||
window.siyuan.menus.menu.remove();
|
window.siyuan.menus.menu.remove();
|
||||||
|
if (!protyle.disabled) {
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
label: window.siyuan.languages.mergeCell,
|
label: window.siyuan.languages.mergeCell,
|
||||||
click: () => {
|
click: () => {
|
||||||
@ -1294,6 +1295,7 @@ export class WYSIWYG {
|
|||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||||
|
}
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
icon: "iconCopy",
|
icon: "iconCopy",
|
||||||
accelerator: "⌘C",
|
accelerator: "⌘C",
|
||||||
@ -1305,6 +1307,7 @@ export class WYSIWYG {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
|
if (!protyle.disabled) {
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
icon: "iconCut",
|
icon: "iconCut",
|
||||||
accelerator: "⌘X",
|
accelerator: "⌘X",
|
||||||
@ -1341,6 +1344,7 @@ export class WYSIWYG {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
|
}
|
||||||
window.siyuan.menus.menu.popup({x: mouseUpEvent.clientX - 8, y: mouseUpEvent.clientY - 16});
|
window.siyuan.menus.menu.popup({x: mouseUpEvent.clientX - 8, y: mouseUpEvent.clientY - 16});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user