mail page fix design
This commit is contained in:
parent
d0f6c78c38
commit
17c33d7fc0
@ -56,26 +56,14 @@ export default function ComposeEmail({
|
||||
useEffect(() => {
|
||||
if (composeBodyRef.current) {
|
||||
const decodedContent = decodeComposeContent(composeBody);
|
||||
composeBodyRef.current.innerHTML = decodedContent
|
||||
.replace(/<div[^>]*>/g, '<div dir="ltr" style="direction: ltr; text-align: left;">')
|
||||
.replace(/<p[^>]*>/g, '<p dir="ltr" style="direction: ltr; text-align: left;">');
|
||||
composeBodyRef.current.innerHTML = decodedContent;
|
||||
}
|
||||
}, [composeBody]);
|
||||
|
||||
const handleInput = (e: React.FormEvent<HTMLDivElement>) => {
|
||||
if (composeBodyRef.current) {
|
||||
const content = composeBodyRef.current.innerHTML
|
||||
.replace(/<br>/g, '<br>')
|
||||
.replace(/<p>/g, '<p>')
|
||||
.replace(/<\/p>/g, '</p>')
|
||||
.replace(/<div>/g, '<div>')
|
||||
.replace(/<\/div>/g, '</div>')
|
||||
.replace(/<span>/g, '<span>')
|
||||
.replace(/<\/span>/g, '</span>');
|
||||
|
||||
const encodedContent = encodeComposeContent(
|
||||
`<div dir="ltr" style="direction: ltr; text-align: left;">${content}</div>`
|
||||
);
|
||||
const content = composeBodyRef.current.innerHTML;
|
||||
const encodedContent = encodeComposeContent(content);
|
||||
setComposeBody(encodedContent);
|
||||
}
|
||||
};
|
||||
@ -237,10 +225,10 @@ export default function ComposeEmail({
|
||||
className="w-full h-full mt-1 bg-white border border-gray-300 rounded-md p-2 text-gray-900 overflow-y-auto"
|
||||
style={{
|
||||
minHeight: '200px',
|
||||
direction: 'ltr',
|
||||
textAlign: 'left'
|
||||
unicodeBidi: 'plaintext',
|
||||
textAlign: 'start'
|
||||
}}
|
||||
dir="ltr"
|
||||
dir="auto"
|
||||
data-gramm="false"
|
||||
data-gramm_editor="false"
|
||||
data-enable-grammarly="false"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user