mail page fix
This commit is contained in:
parent
3e9bc34c6e
commit
536ff35b34
@ -54,13 +54,7 @@ export default function ComposeEmail({
|
|||||||
// Update the contentEditable div when composeBody changes
|
// Update the contentEditable div when composeBody changes
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (composeBodyRef.current && composeBody) {
|
if (composeBodyRef.current && composeBody) {
|
||||||
// Clear existing content
|
composeBodyRef.current.innerHTML = composeBody;
|
||||||
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]);
|
}, [composeBody]);
|
||||||
|
|
||||||
@ -232,6 +226,7 @@ export default function ComposeEmail({
|
|||||||
fontSize: 'inherit',
|
fontSize: 'inherit',
|
||||||
lineHeight: 'inherit',
|
lineHeight: 'inherit',
|
||||||
}}
|
}}
|
||||||
|
dangerouslySetInnerHTML={{ __html: composeBody }}
|
||||||
onInput={handleInput}
|
onInput={handleInput}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user