From 1515fba6c94d2c4b02dd3f8854638e2f106bff8d Mon Sep 17 00:00:00 2001 From: Joshua Ryder Date: Fri, 7 Nov 2025 10:16:31 -0500 Subject: [PATCH] fix: Improve rich text formatting in emails and add button hints MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix highlighting display in emailed notes and add clear formatting hints to email/download buttons. Changes: - Added proper HTML/CSS structure to email template for rich text support - Added CSS styles for mark (highlight), strong, em, u, s, headings, and lists - Highlight now renders with yellow background (#fef08a) in emails - All rich text formatting now properly displays in email clients - Added formatting hints to buttons: "Email Notes (Formatting included)" and "Download Notes (No formatting)" - Button hints use smaller text with opacity for subtle visual hierarchy Email template improvements: - Proper DOCTYPE and HTML structure - Style block in head for rich text elements - Removed white-space: pre-wrap from notes div to allow HTML rendering - Maintained all existing sermon content styling This ensures users understand that: - Email preserves all rich text formatting (bold, italic, highlights, lists, etc.) - Download converts to plain text for universal compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- pages/[slug].vue | 10 ++++- server/utils/email.ts | 99 +++++++++++++++++++++++++++++++------------ 2 files changed, 81 insertions(+), 28 deletions(-) diff --git a/pages/[slug].vue b/pages/[slug].vue index 9264a9c..b77d54a 100644 --- a/pages/[slug].vue +++ b/pages/[slug].vue @@ -135,13 +135,19 @@ class="flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 disabled:bg-blue-400 disabled:cursor-not-allowed font-medium transition-colors" > Sending... - 📧 Email Notes + + 📧 Email Notes + (Formatting included) +

diff --git a/server/utils/email.ts b/server/utils/email.ts index 9f8e11d..f0813a4 100644 --- a/server/utils/email.ts +++ b/server/utils/email.ts @@ -152,38 +152,85 @@ My Notes: ${userNotes || 'No notes taken'} `, html: ` -

-

Sermon Notes

- -
-

${sermonTitle}

-

${sermonDate}

-
+ + + + + + +
+

Sermon Notes

-
-

Bible References

-
${bibleReferences}
-
+
+

${sermonTitle}

+

${sermonDate}

+
-
-

Personal Appliance

-
${personalAppliance}
-
+
+

Bible References

+
${bibleReferences}
+
-
-

Pastor's Challenge

-
${pastorsChallenge}
-
+
+

Personal Appliance

+
${personalAppliance}
+
-
-

My Notes

-
${userNotes || 'No notes taken'}
-
+
+

Pastor's Challenge

+
${pastorsChallenge}
+
-
-

This email was sent from New Life Christian Church.

+
+

My Notes

+
${userNotes || 'No notes taken'}
+
+ +
+

This email was sent from New Life Christian Church.

+
-
+ + `, }