Prevents the content from automatically wrapping to the next line

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-04-04 16:52:39 +07:00
committed by Dat H. Pham
parent 75b675002c
commit 7523ddf07b
2 changed files with 7 additions and 5 deletions
@@ -32,7 +32,6 @@ class SanitizeAutolinkFilter {
options: _linkifyOption,
linkifiers: _linkifier,
);
log('AutolinkFilter::process:elements: $elements');
final htmlTextBuffer = StringBuffer();
for (var element in elements) {
@@ -53,8 +52,9 @@ class SanitizeAutolinkFilter {
htmlTextBuffer.write(urlLinkTag);
}
}
return htmlTextBuffer.toString();
final textSanitized = htmlTextBuffer.toString();
log('SanitizeAutolinkFilter::process:htmlTextBuffer = $textSanitized');
return textSanitized;
} catch (e) {
logError('$runtimeType::process:Exception = $e');
return inputText;
@@ -62,10 +62,10 @@ class SanitizeAutolinkFilter {
}
String _buildUrlLinkTag({required String urlLink, required String value}) {
return '<a href="$urlLink" target="_blank" rel="noreferrer">$value</a>';
return '<a href="$urlLink" target="_blank" rel="noreferrer" style="white-space: nowrap; word-break: keep-all;">$value</a>';
}
String _buildEmailLinkTag({required String mailToLink, required String value}) {
return '<a href="$mailToLink">$value</a>';
return '<a href="$mailToLink" style="white-space: nowrap; word-break: keep-all;">$value</a>';
}
}
+2
View File
@@ -138,6 +138,8 @@ class HtmlUtils {
min-height: ${minHeight ?? 0}px;
min-width: ${minWidth ?? 0}px;
overflow: auto;
overflow-wrap: break-word;
word-break: break-word;
}
${hideScrollBar ? '''
.tmail-content::-webkit-scrollbar {