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