This commit is contained in:
Vanessa 2022-10-23 09:24:18 +08:00
parent 1134854c40
commit 70c89fcc87

View file

@ -152,7 +152,12 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
// 使用 md 闭合后继续输入应为普通文本
blockElement.outerHTML = html.replace("</span><wbr>", "</span>" + Constants.ZWSP + "<wbr>");
}
blockElement = protyle.wysiwyg.element.querySelector(`[data-node-id="${id}"]`);
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${id}"]`).forEach((item: HTMLElement) => {
if (item.getAttribute("data-type") === "NodeBlockQueryEmbed" ||
!hasClosestByAttribute(item, "data-type", "NodeBlockQueryEmbed")) {
blockElement = item;
}
});
Array.from(tempElement.content.children).forEach((item, index) => {
const tempId = item.getAttribute("data-node-id");
let realElement;