diff --git a/app/src/protyle/toolbar/Font.ts b/app/src/protyle/toolbar/Font.ts index bbde437ac..1428343c3 100644 --- a/app/src/protyle/toolbar/Font.ts +++ b/app/src/protyle/toolbar/Font.ts @@ -70,6 +70,11 @@ export const fontMenu = (protyle: IProtyle) => { }); lastColorHTML += ""; } + const textElement = protyle.toolbar.range.cloneContents().querySelector('[data-type~="text"]') as HTMLElement; + let fontSize = "16px"; + if (textElement) { + fontSize = textElement.style.fontSize; + } element.innerHTML = `${lastColorHTML}
${window.siyuan.languages.colorFont}
${colorHTML} @@ -86,18 +91,18 @@ export const fontMenu = (protyle: IProtyle) => {
${window.siyuan.languages.fontSize}
`; element.addEventListener(getEventName(), function (event: Event) {