TF-1886 Support RTL mode for HTML display
(cherry picked from commit 9ac393489e746b49073b1a2d98063481f4c894c6)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const nameClassToolTip = 'tmail-tooltip';
|
||||
|
||||
const tooltipLinkCss = '''
|
||||
@@ -27,6 +29,7 @@ String generateHtml(String content, {
|
||||
String? styleCSS,
|
||||
String? javaScripts,
|
||||
bool hideScrollBar = true,
|
||||
TextDirection? direction
|
||||
}) {
|
||||
return '''
|
||||
<!DOCTYPE html>
|
||||
@@ -53,7 +56,7 @@ String generateHtml(String content, {
|
||||
</style>
|
||||
${javaScripts ?? ''}
|
||||
</head>
|
||||
<body style = "overflow-x: hidden">
|
||||
<body ${direction == TextDirection.rtl ? 'dir="rtl"' : ''} style = "overflow-x: hidden">
|
||||
<div class="tmail-content">$content</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user