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>) => {
|
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>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user