mail page fix

This commit is contained in:
alma 2025-04-21 18:44:02 +02:00
parent 3e9bc34c6e
commit 536ff35b34

View File

@ -54,13 +54,7 @@ export default function ComposeEmail({
// Update the contentEditable div when composeBody changes
useEffect(() => {
if (composeBodyRef.current && 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);
composeBodyRef.current.innerHTML = composeBody;
}
}, [composeBody]);
@ -232,6 +226,7 @@ export default function ComposeEmail({
fontSize: 'inherit',
lineHeight: 'inherit',
}}
dangerouslySetInnerHTML={{ __html: composeBody }}
onInput={handleInput}
/>
</div>