mail page fix design
This commit is contained in:
parent
68c1936690
commit
448f34e655
@ -62,13 +62,20 @@ export default function ComposeEmail({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (composeBodyRef.current) {
|
if (composeBodyRef.current) {
|
||||||
const decodedContent = decodeComposeContent(composeBody);
|
const decodedContent = decodeComposeContent(composeBody);
|
||||||
composeBodyRef.current.innerHTML = `<br/><br/>${decodedContent}`;
|
composeBodyRef.current.innerHTML = `
|
||||||
|
<div style="min-height: 20px;"></div>
|
||||||
|
<div style="white-space: pre-wrap; word-wrap: break-word;">
|
||||||
|
${decodedContent}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
const range = document.createRange();
|
const range = document.createRange();
|
||||||
const sel = window.getSelection();
|
const sel = window.getSelection();
|
||||||
range.setStart(composeBodyRef.current, 0);
|
if (composeBodyRef.current.firstChild) {
|
||||||
range.collapse(true);
|
range.setStart(composeBodyRef.current.firstChild, 0);
|
||||||
sel?.removeAllRanges();
|
range.collapse(true);
|
||||||
sel?.addRange(range);
|
sel?.removeAllRanges();
|
||||||
|
sel?.addRange(range);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [composeBody]);
|
}, [composeBody]);
|
||||||
|
|
||||||
@ -259,8 +266,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"
|
className="w-full h-full mt-1 bg-white border border-gray-300 rounded-md p-2 text-gray-900 overflow-y-auto"
|
||||||
style={{
|
style={{
|
||||||
minHeight: '200px',
|
minHeight: '200px',
|
||||||
writingMode: 'horizontal-tb',
|
whiteSpace: 'pre-wrap',
|
||||||
direction: 'ltr'
|
wordWrap: 'break-word',
|
||||||
|
overflowWrap: 'break-word',
|
||||||
|
writingMode: 'horizontal-tb'
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user