From 95bc4bc5b7d135b864f0be64397fcb27cc7fa6c1 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 18 Apr 2026 03:03:05 +0000 Subject: [PATCH] Changes Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com> --- src/components/forms/custom-form-builder.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/forms/custom-form-builder.tsx b/src/components/forms/custom-form-builder.tsx index b686dce..7342044 100644 --- a/src/components/forms/custom-form-builder.tsx +++ b/src/components/forms/custom-form-builder.tsx @@ -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;