mail page fix design
This commit is contained in:
parent
448f34e655
commit
6df9284be7
@ -63,19 +63,16 @@ export default function ComposeEmail({
|
||||
if (composeBodyRef.current) {
|
||||
const decodedContent = decodeComposeContent(composeBody);
|
||||
composeBodyRef.current.innerHTML = `
|
||||
<div style="min-height: 20px;"></div>
|
||||
<div style="white-space: pre-wrap; word-wrap: break-word;">
|
||||
${decodedContent}
|
||||
</div>
|
||||
`;
|
||||
<div style="margin-bottom: 20px;"></div>
|
||||
${decodedContent}`;
|
||||
|
||||
// Place cursor at the beginning
|
||||
const range = document.createRange();
|
||||
const sel = window.getSelection();
|
||||
if (composeBodyRef.current.firstChild) {
|
||||
range.setStart(composeBodyRef.current.firstChild, 0);
|
||||
range.collapse(true);
|
||||
sel?.removeAllRanges();
|
||||
sel?.addRange(range);
|
||||
}
|
||||
range.setStart(composeBodyRef.current, 0);
|
||||
range.collapse(true);
|
||||
sel?.removeAllRanges();
|
||||
sel?.addRange(range);
|
||||
}
|
||||
}, [composeBody]);
|
||||
|
||||
@ -265,11 +262,7 @@ export default function ComposeEmail({
|
||||
onInput={handleInput}
|
||||
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',
|
||||
whiteSpace: 'pre-wrap',
|
||||
wordWrap: 'break-word',
|
||||
overflowWrap: 'break-word',
|
||||
writingMode: 'horizontal-tb'
|
||||
minHeight: '200px'
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user