feat(config): Set markdown's font-family

This commit is contained in:
frostime
2024-08-03 16:04:20 +08:00
parent d9e407fd2b
commit b6a022b0ef
6 changed files with 21 additions and 0 deletions

View File

@@ -194,6 +194,7 @@ export function autoGrowTextArea(dom: HTMLTextAreaElement) {
measureDom.style.width = width + "px";
measureDom.innerText = dom.value !== "" ? dom.value : "1";
measureDom.style.fontSize = dom.style.fontSize;
measureDom.style.fontFamily = dom.style.fontFamily;
const endWithEmptyLine = dom.value.endsWith("\n");
const height = parseFloat(window.getComputedStyle(measureDom).height);
const singleLineHeight = parseFloat(