mail page fix

This commit is contained in:
alma 2025-04-21 18:39:18 +02:00
parent 57255ad03e
commit 3e9bc34c6e

View File

@ -54,7 +54,13 @@ export default function ComposeEmail({
// Update the contentEditable div when composeBody changes
useEffect(() => {
if (composeBodyRef.current && composeBody) {
composeBodyRef.current.innerHTML = composeBody;
// Clear existing content
composeBodyRef.current.innerHTML = '';
// Create a temporary div to parse the HTML
const tempDiv = document.createElement('div');
tempDiv.innerHTML = composeBody;
// Append the parsed content
composeBodyRef.current.appendChild(tempDiv);
}
}, [composeBody]);
@ -227,7 +233,6 @@ export default function ComposeEmail({
lineHeight: 'inherit',
}}
onInput={handleInput}
dangerouslySetInnerHTML={{ __html: composeBody }}
/>
</div>
</div>