mail page fix design
This commit is contained in:
parent
f05c4dac7f
commit
401a0c4426
@ -54,7 +54,17 @@ export default function ComposeEmail({
|
||||
|
||||
useEffect(() => {
|
||||
if (composeBodyRef.current) {
|
||||
composeBodyRef.current.innerHTML = composeBody;
|
||||
// Remove any 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 to the contentEditable div
|
||||
while (tempDiv.firstChild) {
|
||||
composeBodyRef.current.appendChild(tempDiv.firstChild);
|
||||
}
|
||||
}
|
||||
}, [composeBody]);
|
||||
|
||||
@ -219,8 +229,12 @@ export default function ComposeEmail({
|
||||
contentEditable
|
||||
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 prose max-w-none"
|
||||
style={{ minHeight: '200px' }}
|
||||
dangerouslySetInnerHTML={{ __html: composeBody }}
|
||||
style={{
|
||||
minHeight: '200px',
|
||||
direction: 'ltr',
|
||||
textAlign: 'left'
|
||||
}}
|
||||
dir="ltr"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user