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/15142

Vanessa18a60a4e0a1c
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts
index 66fc716f2c..34532199c5 100644
--- a/app/src/protyle/util/editorCommonEvent.ts
+++ b/app/src/protyle/util/editorCommonEvent.ts
@@ -842,8 +842,15 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
return;
} else if (target.classList.contains("av__gallery-item")) {
window.siyuan.dragElement = target;
- event.dataTransfer.setData(`${Constants.SIYUAN_DROP_GUTTER}NodeAttributeView${Constants.ZWSP}GalleryItem${Constants.ZWSP}${[target.getAttribute("data-id")]}`,
- target.outerHTML);
+ const blockElement = hasClosestBlock(target);
+ if (blockElement) {
+ const selectIds: string[] = [];
+ blockElement.querySelectorAll(".av__gallery-item--select").forEach(item => {
+ selectIds.push(item.getAttribute("data-id"));
+ });
+ event.dataTransfer.setData(`${Constants.SIYUAN_DROP_GUTTER}NodeAttributeView${Constants.ZWSP}GalleryItem${Constants.ZWSP}${selectIds}`,
+ target.outerHTML);
+ }
return;
}
}