Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/9992

Vanessa68b38c0f0fb4
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index 8a202d663e..cbd96eced7 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -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") {
diff --git a/app/src/protyle/upload/index.ts b/app/src/protyle/upload/index.ts
index 72ac0d8627..9aef21d80c 100644
--- a/app/src/protyle/upload/index.ts
+++ b/app/src/protyle/upload/index.ts
@@ -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) => {