courrier refactor rebuild preview
This commit is contained in:
parent
88e03326af
commit
cb3e119a5d
@ -123,14 +123,17 @@ export default function EmailPreview({ email, loading = false, onReply }: EmailP
|
|||||||
hasAttachments: email.hasAttachments || false
|
hasAttachments: email.hasAttachments || false
|
||||||
};
|
};
|
||||||
|
|
||||||
// Get the raw content - this is what we'd normally display directly
|
// Get the raw content directly
|
||||||
const rawContent = email.content || email.html || email.text || '';
|
const rawContent = email.content || email.html || email.text || '';
|
||||||
|
|
||||||
// Log both raw and formatted content for debugging
|
// Now use the same content that would be shown in a reply
|
||||||
console.log("Raw content:", rawContent.substring(0, 200));
|
// This is exactly what ComposeEmail shows
|
||||||
|
const { content } = formatReplyEmail(formatterEmail, 'reply');
|
||||||
|
|
||||||
// Use the same formatters that ComposeEmail uses
|
console.log("Formatted content for display:", content.substring(0, 200));
|
||||||
setFormattedContent(rawContent);
|
|
||||||
|
// Use the formatted content that includes the proper structure
|
||||||
|
setFormattedContent(content);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error formatting email content:', error);
|
console.error('Error formatting email content:', error);
|
||||||
// Fallback to raw content if formatting fails
|
// Fallback to raw content if formatting fails
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user