From 78edaee29561b837ee63bab7b3b647710a484e51 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 30 Mar 2023 19:48:36 +0800 Subject: [PATCH] =?UTF-8?q?:iphone:=20=E6=96=87=E6=A1=A3=E4=B8=AD=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=A1=A8=E6=83=85=E6=97=A0=E6=B3=95=E5=8D=B3=E4=BD=BF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/emoji/index.ts | 4 ++-- app/src/protyle/wysiwyg/transaction.ts | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/src/emoji/index.ts b/app/src/emoji/index.ts index a80c8bb37..330a622ce 100644 --- a/app/src/emoji/index.ts +++ b/app/src/emoji/index.ts @@ -201,9 +201,9 @@ export const openEmojiPanel = (id: string, target: HTMLElement, isNotebook = fal - + - +
${filterEmoji()}
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts index 23b2c0ff5..5b6623fbc 100644 --- a/app/src/protyle/wysiwyg/transaction.ts +++ b/app/src/protyle/wysiwyg/transaction.ts @@ -442,18 +442,20 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b } }); let nodeAttrHTML = bookmarkHTML + nameHTML + aliasHTML + memoHTML; - if (protyle.block.rootID === operation.id && protyle.title) { + if (protyle.block.rootID === operation.id) { // 文档 - const refElement = protyle.title.element.querySelector(".protyle-attr--refcount"); - if (refElement) { - nodeAttrHTML += refElement.outerHTML; + if (protyle.title) { + const refElement = protyle.title.element.querySelector(".protyle-attr--refcount"); + if (refElement) { + nodeAttrHTML += refElement.outerHTML; + } + if (data.new["custom-riff-decks"]) { + protyle.title.element.setAttribute("custom-riff-decks", data.new["custom-riff-decks"]); + } else { + protyle.title.element.removeAttribute("custom-riff-decks"); + } + protyle.title.element.querySelector(".protyle-attr").innerHTML = nodeAttrHTML; } - if (data.new["custom-riff-decks"]) { - protyle.title.element.setAttribute("custom-riff-decks", data.new["custom-riff-decks"]); - } else { - protyle.title.element.removeAttribute("custom-riff-decks"); - } - protyle.title.element.querySelector(".protyle-attr").innerHTML = nodeAttrHTML; protyle.wysiwyg.renderCustom(attrsResult); if (data.new.icon !== data.old.icon) { /// #if MOBILE