Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-18 03:03:05 +00:00
co-authored by renee-png
parent 807d442108
commit 95bc4bc5b7
+4 -2
View File
@@ -300,14 +300,16 @@ export function CustomFormBuilder() {
setTemplates((data ?? []) as unknown as SavedTemplate[]);
};
// Apply font style + line height to editor DOM
// Apply font style + line height + page margin to editor DOM
useEffect(() => {
if (!editor) return;
const el = editor.view.dom as HTMLElement;
el.style.fontFamily = `"${fontFamily}", Georgia, serif`;
el.style.fontSize = `${fontSize}pt`;
el.style.lineHeight = String(lineHeight);
}, [editor, fontFamily, fontSize, lineHeight]);
const padPx = Math.round(marginInches * 96);
el.style.padding = `${padPx}px`;
}, [editor, fontFamily, fontSize, lineHeight, marginInches]);
const insertVar = (key: string) => {
if (!editor) return;