Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
807d442108
commit
95bc4bc5b7
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user