From e06d35f1e1d15a20ee13dc6c70d56bc64ac00bba Mon Sep 17 00:00:00 2001 From: dab246 Date: Fri, 18 Aug 2023 19:04:50 +0700 Subject: [PATCH] TF-1961 Left align signature and title header reply/forward email (cherry picked from commit 9ec81d062d945076d80f4eb4d0cc4e792514cb79) --- core/lib/presentation/extensions/html_extension.dart | 5 +++++ .../utils/html_transformer/html_utils.dart | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/lib/presentation/extensions/html_extension.dart b/core/lib/presentation/extensions/html_extension.dart index 30dff7315..debe5daf4 100644 --- a/core/lib/presentation/extensions/html_extension.dart +++ b/core/lib/presentation/extensions/html_extension.dart @@ -35,4 +35,9 @@ extension HtmlExtension on String { } return this; } + + String addCiteTag() => addBlockTag( + 'cite', + attribute: 'style="text-align: left;display: block;"' + ); } \ No newline at end of file diff --git a/core/lib/presentation/utils/html_transformer/html_utils.dart b/core/lib/presentation/utils/html_transformer/html_utils.dart index d1c659265..221b7de53 100644 --- a/core/lib/presentation/utils/html_transformer/html_utils.dart +++ b/core/lib/presentation/utils/html_transformer/html_utils.dart @@ -75,7 +75,7 @@ class HtmlUtils { const options = { root: null, // Use the viewport as the root rootMargin: "0px", - threshold: 0.1 // Specify the threshold for intersection + threshold: 0 // Specify the threshold for intersection }; const handleIntersection = (entries, observer) => { @@ -131,6 +131,10 @@ class HtmlUtils { border-radius: 4px; overflow: auto; } + + div.tmail-signature { + text-align: left; + } '''; } else if (PlatformInfo.isMobile) { @@ -138,6 +142,10 @@ class HtmlUtils { #editor { direction: ${direction.name}; } + + div.tmail-signature { + text-align: left; + } '''; } else { return '';