TF-3944 Use new style with line height 24px in content writing of composer view
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ class HideDraftSignatureTransformer extends DomTransformer {
|
||||
Map<String, String>? mapUrlDownloadCID
|
||||
}) async {
|
||||
try {
|
||||
final signature = document.querySelector('div.tmail-signature');
|
||||
final signature = document.querySelector('.tmail-signature');
|
||||
if (signature == null) return;
|
||||
final currentStyle = signature.attributes['style']?.trim();
|
||||
if (currentStyle == null) {
|
||||
|
||||
@@ -15,7 +15,7 @@ class SignatureTransformer extends DomTransformer {
|
||||
Map<String, String>? mapUrlDownloadCID,
|
||||
}) async {
|
||||
try {
|
||||
final signatureElements = document.querySelectorAll('div.tmail-signature');
|
||||
final signatureElements = document.querySelectorAll('.tmail-signature');
|
||||
|
||||
if (signatureElements.isEmpty) return;
|
||||
|
||||
|
||||
@@ -25,8 +25,10 @@ class HtmlTemplate {
|
||||
|
||||
static const String printDocumentCssStyle = '''
|
||||
<style>
|
||||
$fontFaceStyle
|
||||
|
||||
body,td,div,p,a,input {
|
||||
font-family: arial, sans-serif;
|
||||
font-family: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
body, td {
|
||||
@@ -102,12 +104,27 @@ class HtmlTemplate {
|
||||
''';
|
||||
|
||||
static const String defaultFontStyle = '''
|
||||
body {
|
||||
div, p, span, th, td, tr, ul, ol, li, a, button {
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
letter-spacing: -0.01em; /* -1% */
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0px;
|
||||
}
|
||||
''';
|
||||
|
||||
static const String defaultEditorFontStyle = '''
|
||||
#editor, .note-editable, .note-frame {
|
||||
font-size: 16px;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0px;
|
||||
}
|
||||
''';
|
||||
|
||||
static const String previewEMLFileCssStyle = '''
|
||||
@@ -271,7 +288,7 @@ class HtmlTemplate {
|
||||
<style>
|
||||
${HtmlTemplate.fontFaceStyle}
|
||||
|
||||
${useDefaultFontStyle ? HtmlTemplate.defaultFontStyle : ''}
|
||||
${useDefaultFontStyle ? HtmlTemplate.defaultEditorFontStyle : ''}
|
||||
|
||||
${customScrollbar ? '''
|
||||
html, .note-editable, .note-codable {
|
||||
@@ -311,7 +328,7 @@ class HtmlTemplate {
|
||||
}) => '''
|
||||
${HtmlTemplate.fontFaceStyle}
|
||||
|
||||
${useDefaultFontStyle ? HtmlTemplate.defaultFontStyle : ''}
|
||||
${useDefaultFontStyle ? HtmlTemplate.defaultEditorFontStyle : ''}
|
||||
|
||||
#editor {
|
||||
direction: ${direction.name};
|
||||
|
||||
@@ -49,6 +49,7 @@ class HtmlUtils {
|
||||
<style>
|
||||
.note-frame, .note-tooltip-content, .note-popover {
|
||||
font-family: 'Inter', sans-serif;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.note-editable {
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ extension SanitizeSignatureInEmailContentExtension on ComposerController {
|
||||
final existedSignatureButton = emailDocument.querySelector('.tmail-signature-button');
|
||||
if (existedSignatureButton != null) return;
|
||||
|
||||
final signature = emailDocument.querySelector('div.tmail-signature');
|
||||
final signature = emailDocument.querySelector('.tmail-signature');
|
||||
if (signature == null) return;
|
||||
|
||||
restoringSignatureButton = true;
|
||||
|
||||
@@ -192,7 +192,7 @@ class HtmlAnalyzer {
|
||||
Future<String> removeCollapsedExpandedSignatureEffect({required String emailContent}) async {
|
||||
try {
|
||||
final document = parse(emailContent);
|
||||
final signatureElements = document.querySelectorAll('div.tmail-signature');
|
||||
final signatureElements = document.querySelectorAll('.tmail-signature');
|
||||
await Future.wait(signatureElements.map((signatureTag) async {
|
||||
final signatureChildren = signatureTag.children;
|
||||
for (var child in signatureChildren) {
|
||||
|
||||
Reference in New Issue
Block a user