From 6820ad147cfddf80b69044229203475f838c7ed5 Mon Sep 17 00:00:00 2001 From: dab246 Date: Mon, 18 Aug 2025 13:29:18 +0700 Subject: [PATCH] TF-3918 Fix `line-height` is auto changed when copy/paste or drag/drop from odt file Signed-off-by: dab246 --- .../composer/presentation/widgets/web/web_editor_widget.dart | 2 ++ .../widgets/identity_signature_input_field_widget.dart | 2 ++ .../manage_account/presentation/vacation/vacation_view.dart | 2 ++ 3 files changed, 6 insertions(+) diff --git a/lib/features/composer/presentation/widgets/web/web_editor_widget.dart b/lib/features/composer/presentation/widgets/web/web_editor_widget.dart index 10c414234..ea381728d 100644 --- a/lib/features/composer/presentation/widgets/web/web_editor_widget.dart +++ b/lib/features/composer/presentation/widgets/web/web_editor_widget.dart @@ -139,6 +139,8 @@ class _WebEditorState extends State { ), spellCheck: true, disableDragAndDrop: true, + normalizeHtmlTextWhenDropping: true, + normalizeHtmlTextWhenPasting: true, webInitialScripts: UnmodifiableListView([ WebScript( name: HtmlUtils.lineHeight100Percent.name, diff --git a/lib/features/identity_creator/presentation/widgets/identity_signature_input_field_widget.dart b/lib/features/identity_creator/presentation/widgets/identity_signature_input_field_widget.dart index cf1745701..7abfa8abe 100644 --- a/lib/features/identity_creator/presentation/widgets/identity_signature_input_field_widget.dart +++ b/lib/features/identity_creator/presentation/widgets/identity_signature_input_field_widget.dart @@ -152,6 +152,8 @@ class IdentitySignatureInputFieldWidget extends StatelessWidget { initialText: initContent.isEmpty ? null : initContent, disableDragAndDrop: true, spellCheck: true, + normalizeHtmlTextWhenDropping: true, + normalizeHtmlTextWhenPasting: true, customBodyCssStyle: HtmlUtils.customInlineBodyCssStyleHtmlEditor( direction: AppUtils.getCurrentDirection(context), ), diff --git a/lib/features/manage_account/presentation/vacation/vacation_view.dart b/lib/features/manage_account/presentation/vacation/vacation_view.dart index 37b93a00d..43cc82737 100644 --- a/lib/features/manage_account/presentation/vacation/vacation_view.dart +++ b/lib/features/manage_account/presentation/vacation/vacation_view.dart @@ -509,6 +509,8 @@ class VacationView extends GetWidget { cacheHTMLAssetOffline: true, initialText: controller.vacationMessageHtmlText, spellCheck: true, + normalizeHtmlTextWhenDropping: true, + normalizeHtmlTextWhenPasting: true, customBodyCssStyle: HtmlUtils.customInlineBodyCssStyleHtmlEditor( direction: AppUtils.getCurrentDirection(context), horizontalPadding: 0,