mail page fix design
This commit is contained in:
parent
90f0033230
commit
7c655dafcf
@ -53,13 +53,16 @@ export default function ComposeEmail({
|
||||
|
||||
const handleInput = (e: React.FormEvent<HTMLDivElement>) => {
|
||||
if (composeBodyRef.current) {
|
||||
setComposeBody(composeBodyRef.current.textContent || '');
|
||||
const content = composeBodyRef.current.textContent || '';
|
||||
setComposeBody(content);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (composeBodyRef.current) {
|
||||
composeBodyRef.current.textContent = composeBody;
|
||||
composeBodyRef.current.innerHTML = '';
|
||||
const textNode = document.createTextNode(composeBody);
|
||||
composeBodyRef.current.appendChild(textNode);
|
||||
}
|
||||
}, [composeBody]);
|
||||
|
||||
@ -225,10 +228,11 @@ export default function ComposeEmail({
|
||||
fontFamily: 'inherit',
|
||||
fontSize: 'inherit',
|
||||
lineHeight: 'inherit',
|
||||
direction: 'ltr',
|
||||
textAlign: 'left'
|
||||
unicodeBidi: 'normal',
|
||||
direction: 'ltr'
|
||||
}}
|
||||
onInput={handleInput}
|
||||
suppressContentEditableWarning
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user