diff --git a/components/ComposeEmail.tsx b/components/ComposeEmail.tsx
index 233d0289..a9b1ba2a 100644
--- a/components/ComposeEmail.tsx
+++ b/components/ComposeEmail.tsx
@@ -63,19 +63,16 @@ export default function ComposeEmail({
if (composeBodyRef.current) {
const decodedContent = decodeComposeContent(composeBody);
composeBodyRef.current.innerHTML = `
-
-
- ${decodedContent}
-
- `;
+
+${decodedContent}`;
+
+ // Place cursor at the beginning
const range = document.createRange();
const sel = window.getSelection();
- if (composeBodyRef.current.firstChild) {
- range.setStart(composeBodyRef.current.firstChild, 0);
- range.collapse(true);
- sel?.removeAllRanges();
- sel?.addRange(range);
- }
+ range.setStart(composeBodyRef.current, 0);
+ range.collapse(true);
+ sel?.removeAllRanges();
+ sel?.addRange(range);
}
}, [composeBody]);
@@ -265,11 +262,7 @@ export default function ComposeEmail({
onInput={handleInput}
className="w-full h-full mt-1 bg-white border border-gray-300 rounded-md p-2 text-gray-900 overflow-y-auto"
style={{
- minHeight: '200px',
- whiteSpace: 'pre-wrap',
- wordWrap: 'break-word',
- overflowWrap: 'break-word',
- writingMode: 'horizontal-tb'
+ minHeight: '200px'
}}
/>