Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions components/email/email-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,7 @@ export function EmailViewer({
pre { white-space: pre-wrap; word-wrap: break-word; }
${wordHtmlCSS}
${darkModeCSS}
</style></head><body>${effectiveEmailContent.html}<style>html,body{height:auto!important;min-height:0!important;max-height:none!important}</style></body></html>`;
</style></head><body dir="auto">${effectiveEmailContent.html}<style>html,body{height:auto!important;min-height:0!important;max-height:none!important}</style></body></html>`;
}, [effectiveEmailContent.html, effectiveEmailContent.isHtml, effectiveEmailContent.hasStyleTag, effectiveEmailContent.externalBlocked, isDark, emailHasNativeDarkMode]);

// Unblocking external content is handled by rebuilding the iframe srcDoc:
Expand Down Expand Up @@ -2520,7 +2520,7 @@ export function EmailViewer({
.body { font-size: 14px; line-height: 1.6; }
.body img { max-width: 100% !important; height: auto !important; }
@media print { body { margin: 20px; } }
</style></head><body>
</style></head><body dir="auto">
<div class="header">
<div class="subject">${escapeHtml(subjectText)}</div>
<div class="meta">
Expand Down Expand Up @@ -4827,6 +4827,7 @@ export function EmailViewer({
) : (
<div
className="email-content-text text-foreground"
dir="auto"
dangerouslySetInnerHTML={{ __html: sanitizePlainTextRenderedHtml(effectiveEmailContent.html) }}
style={{
fontFamily: 'ui-monospace, "SF Mono", Consolas, monospace',
Expand Down