From 34a51713d0fa498d795656d42b0842deb9fe582f Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 23 Sep 2022 21:42:14 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5936 --- app/src/protyle/toolbar/Font.ts | 11 +++++++---- app/src/protyle/toolbar/index.ts | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/protyle/toolbar/Font.ts b/app/src/protyle/toolbar/Font.ts index b41a66a5d..35a2c9646 100644 --- a/app/src/protyle/toolbar/Font.ts +++ b/app/src/protyle/toolbar/Font.ts @@ -52,16 +52,19 @@ export const fontMenu = (protyle: IProtyle) => { const lastFontStatus = item.split(Constants.ZWSP); switch (lastFontStatus[0]) { case "color": - lastColorHTML += ``; + lastColorHTML += ``; break; case "backgroundColor": - lastColorHTML += ``; + lastColorHTML += ``; break; case "style2": - lastColorHTML += ``; + lastColorHTML += ``; break; case "style4": - lastColorHTML += ``; + lastColorHTML += ``; + break; + case "fontSize": + lastColorHTML += ``; break; } }); diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index dd43d5235..fb2af57e1 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -237,7 +237,7 @@ export class Toolbar { } public setInlineMark(protyle: IProtyle, type: string, action: "range" | "toolbar", textObj?: ITextOption) { - if (["a", "block-ref", "inline-math", "inline-memo"].includes(type)) { + if (["a", "block-ref", "inline-math", "inline-memo"].includes(type) || (type === "text" && !textObj)) { protyle.toolbar.element.querySelector(`[data-type="${type}"]`).dispatchEvent(new CustomEvent("block-ref" === type ? getEventName() : "click")); return; }