diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 7072d1745..d8d2c541f 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -606,14 +606,16 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo: } Object.keys(data.old).forEach(key => { item.removeAttribute(key); + if (key === "custom-avs") { + item.removeAttribute("av-names"); + } }); if (data.new.style && data.new[Constants.CUSTOM_RIFF_DECKS] && data.new[Constants.CUSTOM_RIFF_DECKS] !== data.old[Constants.CUSTOM_RIFF_DECKS]) { data.new.style += ";animation:addCard 450ms linear"; } Object.keys(data.new).forEach(key => { - if ("id" === key || "av-names" === key) { + if ("id" === key) { // 设置属性以后不应该给块元素添加 id 属性 No longer add the `id` attribute to block elements after setting the attribute https://github.com/siyuan-note/siyuan/issues/15327 - // av-names 属性仅用于生成角标,不添加到元素 return; }