This commit is contained in:
Vanessa 2022-10-23 11:54:07 +08:00
parent 70c89fcc87
commit 0303234704

View file

@ -590,11 +590,13 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
const selectedIdsData = window.siyuan.dragElement.getAttribute("data-selected-ids");
const selectedIds = selectedIdsData ? selectedIdsData.split(",") : [window.siyuan.dragElement.getAttribute("data-node-id")];
selectedIds.forEach(item => {
const selectElement = window.siyuan.dragElement.parentElement.parentElement.querySelector(`.protyle-wysiwyg [data-node-id="${item}"]`);
if (selectElement) {
sourceElements.push(selectElement);
window.siyuan.dragElement.parentElement.parentElement.querySelectorAll(`.protyle-wysiwyg [data-node-id="${item}"]`).forEach(elementItem => {
if (elementItem.getAttribute("data-type") === "NodeBlockQueryEmbed" ||
!hasClosestByAttribute(elementItem, "data-type", "NodeBlockQueryEmbed")) {
sourceElements.push(elementItem);
}
});
});
sourceElements.forEach(item => {
item.classList.remove("protyle-wysiwyg--select", "protyle-wysiwyg--hl");
item.removeAttribute("select-start");