diff --git a/components/ComposeEmail.tsx b/components/ComposeEmail.tsx index 96e2930d..0c8c8f81 100644 --- a/components/ComposeEmail.tsx +++ b/components/ComposeEmail.tsx @@ -53,10 +53,16 @@ export default function ComposeEmail({ const handleInput = (e: React.FormEvent) => { if (composeBodyRef.current) { - setComposeBody(composeBodyRef.current.innerHTML); + setComposeBody(composeBodyRef.current.textContent || ''); } }; + useEffect(() => { + if (composeBodyRef.current) { + composeBodyRef.current.textContent = composeBody; + } + }, [composeBody]); + const handleFileAttachment = async (e: React.ChangeEvent) => { if (!e.target.files) return; @@ -206,21 +212,20 @@ export default function ComposeEmail({ {/* Message Body */}
+