diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index fe432864f..3c0bff3b5 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -381,7 +381,12 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b if (operation.previousID) { let beforeElement: Element; Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.previousID}"]`)).find(item => { - if (!hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed")) { + const embedElement = hasClosestByAttribute(item.parentElement, "data-type", "NodeBlockQueryEmbed") + if (embedElement) { + // https://github.com/siyuan-note/siyuan/issues/5524 + embedElement.removeAttribute("data-render"); + blockRender(protyle, embedElement); + } else { beforeElement = item; return true; }