diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index b7265a889..19705ec0b 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -481,6 +481,12 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo: updateElements.push(newUpdateElement); operation.data = newTempElement.outerHTML; operation.id = newUpdateId; + // https://github.com/siyuan-note/siyuan/issues/14326#issuecomment-2746140335 + protyle.wysiwyg.element.childNodes.forEach((item, index) => { + if (index !== 0) { + item.remove(); + } + }) } } if (updateElements.length > 0) {