From 4693ee534332b196f3b28ad18383b7cf18cc9397 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 23 Sep 2022 22:00:27 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5936 --- app/src/protyle/toolbar/Font.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/toolbar/Font.ts b/app/src/protyle/toolbar/Font.ts index 35a2c9646..bbde437ac 100644 --- a/app/src/protyle/toolbar/Font.ts +++ b/app/src/protyle/toolbar/Font.ts @@ -104,7 +104,7 @@ export const fontMenu = (protyle: IProtyle) => { let target = event.target as HTMLElement; while (target && !target.isEqualNode(element)) { if (target.tagName === "BUTTON") { - fontEvent(protyle, target.getAttribute("data-type"), target.style.backgroundColor); + fontEvent(protyle, target.getAttribute("data-type"), target.style.backgroundColor || target.textContent); break; } target = target.parentElement;