mail page fix design

This commit is contained in:
alma 2025-04-21 19:25:16 +02:00
parent 90f0033230
commit 7c655dafcf

View File

@ -53,13 +53,16 @@ export default function ComposeEmail({
const handleInput = (e: React.FormEvent<HTMLDivElement>) => { const handleInput = (e: React.FormEvent<HTMLDivElement>) => {
if (composeBodyRef.current) { if (composeBodyRef.current) {
setComposeBody(composeBodyRef.current.textContent || ''); const content = composeBodyRef.current.textContent || '';
setComposeBody(content);
} }
}; };
useEffect(() => { useEffect(() => {
if (composeBodyRef.current) { if (composeBodyRef.current) {
composeBodyRef.current.textContent = composeBody; composeBodyRef.current.innerHTML = '';
const textNode = document.createTextNode(composeBody);
composeBodyRef.current.appendChild(textNode);
} }
}, [composeBody]); }, [composeBody]);
@ -225,10 +228,11 @@ export default function ComposeEmail({
fontFamily: 'inherit', fontFamily: 'inherit',
fontSize: 'inherit', fontSize: 'inherit',
lineHeight: 'inherit', lineHeight: 'inherit',
direction: 'ltr', unicodeBidi: 'normal',
textAlign: 'left' direction: 'ltr'
}} }}
onInput={handleInput} onInput={handleInput}
suppressContentEditableWarning
/> />
</div> </div>
</div> </div>