diff --git a/app/courrier/page.tsx b/app/courrier/page.tsx
index 96a52709..1bf92b5c 100644
--- a/app/courrier/page.tsx
+++ b/app/courrier/page.tsx
@@ -407,22 +407,22 @@ function getReplyBody(email: Email, type: 'reply' | 'reply-all' | 'forward'): st
if (type === 'forward') {
return `
-
- From: ${email.from}
- Date: ${date}
- Subject: ${email.subject}
- To: ${Array.isArray(email.to) ? email.to.join(', ') : email.to}
- ${content}
-
+
+
From: ${email.from}
+
Date: ${date}
+
Subject: ${email.subject}
+
To: ${Array.isArray(email.to) ? email.to.join(', ') : email.to}
+
${content}
+
`;
} else {
return `
-
- On ${date}, ${email.from} wrote:
- ${content}
-
+
+
On ${date}, ${email.from} wrote:
+
${content}
+
`;
}
diff --git a/components/ComposeEmail.tsx b/components/ComposeEmail.tsx
index f28ebd82..eee604cd 100644
--- a/components/ComposeEmail.tsx
+++ b/components/ComposeEmail.tsx
@@ -51,13 +51,6 @@ export default function ComposeEmail({
}: ComposeEmailProps) {
const composeBodyRef = useRef(null);
- // Add useEffect to update content when composeBody changes
- useEffect(() => {
- if (composeBodyRef.current && composeBody !== composeBodyRef.current.innerHTML) {
- composeBodyRef.current.innerHTML = composeBody;
- }
- }, [composeBody]);
-
const handleInput = (e: React.FormEvent) => {
if (composeBodyRef.current) {
setComposeBody(composeBodyRef.current.innerHTML);
@@ -226,6 +219,7 @@ export default function ComposeEmail({
fontSize: 'inherit',
lineHeight: 'inherit',
}}
+ dangerouslySetInnerHTML={{ __html: composeBody }}
onInput={handleInput}
/>