🚨
This commit is contained in:
parent
dbcd62198a
commit
d8d9ff3b26
3 changed files with 7 additions and 7 deletions
|
@ -1045,7 +1045,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
|
|||
});
|
||||
textElements[2].value = imgElement.getAttribute("alt") || "";
|
||||
element.addEventListener("click", (event) => {
|
||||
let target = event.target as HTMLElement
|
||||
let target = event.target as HTMLElement;
|
||||
while (target) {
|
||||
if (target.dataset.action === "copy") {
|
||||
writeText((target.parentElement.nextElementSibling as HTMLTextAreaElement).value);
|
||||
|
@ -1054,7 +1054,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
|
|||
}
|
||||
target = target.parentElement;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||
|
@ -1449,7 +1449,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
|
|||
});
|
||||
|
||||
element.addEventListener("click", (event) => {
|
||||
let target = event.target as HTMLElement
|
||||
let target = event.target as HTMLElement;
|
||||
while (target) {
|
||||
if (target.dataset.action === "copy") {
|
||||
writeText((target.parentElement.nextElementSibling as HTMLTextAreaElement).value);
|
||||
|
@ -1458,7 +1458,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
|
|||
}
|
||||
target = target.parentElement;
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||
|
|
|
@ -434,7 +434,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
});
|
||||
} else {
|
||||
// 修改表格名 avID 传入到 id 上了 https://github.com/siyuan-note/siyuan/issues/12724
|
||||
const avID = operation.action === "setAttrViewName" ? operation.id : operation.avID
|
||||
const avID = operation.action === "setAttrViewName" ? operation.id : operation.avID;
|
||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${avID}"]`)).forEach((item: HTMLElement) => {
|
||||
item.removeAttribute("data-render");
|
||||
const updateRow = item.querySelector('.av__row[data-need-update="true"]');
|
||||
|
|
|
@ -249,7 +249,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
|
|||
const undoOperation: IOperation[] = [];
|
||||
let currentElement = blockElement;
|
||||
// 回车之前的块为 1\n\n2 时会产生多个块
|
||||
const selectsElement: Element[] = []
|
||||
const selectsElement: Element[] = [];
|
||||
Array.from(enterElement.children).forEach((item: HTMLElement) => {
|
||||
if (item.dataset.nodeId === id) {
|
||||
blockElement.before(item);
|
||||
|
@ -303,7 +303,7 @@ export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle
|
|||
currentElement = item;
|
||||
selectsElement.push(item);
|
||||
});
|
||||
const parentElement = currentElement.parentElement
|
||||
const parentElement = currentElement.parentElement;
|
||||
transaction(protyle, doOperation, undoOperation);
|
||||
if (parentElement.classList.contains("sb") && parentElement.getAttribute("data-sb-layout") === "col") {
|
||||
turnsIntoOneTransaction({
|
||||
|
|
Loading…
Add table
Reference in a new issue