TF-3918 Fix line-height is auto changed when copy/paste or drag/drop from odt file

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-08-18 13:29:18 +07:00
committed by Dat H. Pham
parent b7cd3f7179
commit 6820ad147c
3 changed files with 6 additions and 0 deletions
@@ -139,6 +139,8 @@ class _WebEditorState extends State<WebEditorWidget> {
), ),
spellCheck: true, spellCheck: true,
disableDragAndDrop: true, disableDragAndDrop: true,
normalizeHtmlTextWhenDropping: true,
normalizeHtmlTextWhenPasting: true,
webInitialScripts: UnmodifiableListView([ webInitialScripts: UnmodifiableListView([
WebScript( WebScript(
name: HtmlUtils.lineHeight100Percent.name, name: HtmlUtils.lineHeight100Percent.name,
@@ -152,6 +152,8 @@ class IdentitySignatureInputFieldWidget extends StatelessWidget {
initialText: initContent.isEmpty ? null : initContent, initialText: initContent.isEmpty ? null : initContent,
disableDragAndDrop: true, disableDragAndDrop: true,
spellCheck: true, spellCheck: true,
normalizeHtmlTextWhenDropping: true,
normalizeHtmlTextWhenPasting: true,
customBodyCssStyle: HtmlUtils.customInlineBodyCssStyleHtmlEditor( customBodyCssStyle: HtmlUtils.customInlineBodyCssStyleHtmlEditor(
direction: AppUtils.getCurrentDirection(context), direction: AppUtils.getCurrentDirection(context),
), ),
@@ -509,6 +509,8 @@ class VacationView extends GetWidget<VacationController> {
cacheHTMLAssetOffline: true, cacheHTMLAssetOffline: true,
initialText: controller.vacationMessageHtmlText, initialText: controller.vacationMessageHtmlText,
spellCheck: true, spellCheck: true,
normalizeHtmlTextWhenDropping: true,
normalizeHtmlTextWhenPasting: true,
customBodyCssStyle: HtmlUtils.customInlineBodyCssStyleHtmlEditor( customBodyCssStyle: HtmlUtils.customInlineBodyCssStyleHtmlEditor(
direction: AppUtils.getCurrentDirection(context), direction: AppUtils.getCurrentDirection(context),
horizontalPadding: 0, horizontalPadding: 0,