Vanessa 2023-08-16 22:58:49 +08:00
parent 8dc42764c0
commit 91667b175a

View file

@ -148,12 +148,17 @@ export const input = async (protyle: IProtyle, blockElement: HTMLElement, range:
// 使用 md 闭合后继续输入应为普通文本
blockElement.outerHTML = html.replace("</span><wbr>", "</span>" + Constants.ZWSP + "<wbr>");
}
// https://github.com/siyuan-note/siyuan/issues/8972
const mathSize = blockElement.querySelectorAll('[data-type="inline-math"]').length;
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${id}"]`).forEach((item: HTMLElement) => {
if (item.getAttribute("data-type") === "NodeBlockQueryEmbed" ||
!hasClosestByAttribute(item, "data-type", "NodeBlockQueryEmbed")) {
blockElement = item;
}
});
if (mathSize > 0 && mathSize < html.split('<span data-type="inline-math" data-subtype="math"').length - 1) {
// protyle.toolbar.showRender(protyle, mathElement);
}
Array.from(tempElement.content.children).forEach((item, index) => {
const tempId = item.getAttribute("data-node-id");
let realElement;