Vanessa 2023-12-27 21:28:45 +08:00
parent 6ac753245f
commit 68b38c0f0f
2 changed files with 12 additions and 4 deletions

View file

@ -287,6 +287,7 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type
openMenuPanel({protyle, blockElement, type: "select", cellElements});
} else if (type === "mAsset") {
openMenuPanel({protyle, blockElement, type: "asset", cellElements});
focusBlock(blockElement);
} else if (type === "date") {
openMenuPanel({protyle, blockElement, type: "date", cellElements});
} else if (type === "checkbox") {

View file

@ -143,12 +143,19 @@ const genUploadedLabel = (responseText: string, protyle: IProtyle) => {
}
}
});
if (nodeElement && nodeElement.classList.contains("av")) {
if ((nodeElement && nodeElement.classList.contains("av"))) {
updateCellsValue(protyle, nodeElement, avAssets);
} else {
// 避免插入代码块中,其次因为都要独立成块 https://github.com/siyuan-note/siyuan/issues/7607
insertHTML(succFileText, protyle, insertBlock);
return
}
if (document.querySelector(".av__panel")) {
const blockElement = hasClosestBlock(protyle.wysiwyg.element.querySelector(".av__cell--select"));
if (blockElement) {
updateCellsValue(protyle, blockElement, avAssets);
return;
}
}
// 避免插入代码块中,其次因为都要独立成块 https://github.com/siyuan-note/siyuan/issues/7607
insertHTML(succFileText, protyle, insertBlock);
};
export const uploadLocalFiles = (files: string[], protyle: IProtyle, isUpload: boolean) => {