From f35bcd8c882488ae818a57a1681f2032d029ee40 Mon Sep 17 00:00:00 2001 From: dab246 Date: Fri, 13 Oct 2023 15:19:07 +0700 Subject: [PATCH] Add script trigger content size changed on android Signed-off-by: dab246 (cherry picked from commit c39e932b634d164d75c0cf1cac35c27be04d8e1b) --- .../utils/html_transformer/html_utils.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/lib/presentation/utils/html_transformer/html_utils.dart b/core/lib/presentation/utils/html_transformer/html_utils.dart index 7ae5eec1a..4ae3f938c 100644 --- a/core/lib/presentation/utils/html_transformer/html_utils.dart +++ b/core/lib/presentation/utils/html_transformer/html_utils.dart @@ -6,6 +6,7 @@ import 'package:flutter/material.dart'; class HtmlUtils { static const scrollEventJSChannelName = 'ScrollEventListener'; + static const contentSizeChangedEventJSChannelName = 'ContentSizeChangedEventListener'; static const runScriptsHandleScrollEvent = ''' let contentElement = document.getElementsByClassName('tmail-content')[0]; @@ -61,6 +62,16 @@ class HtmlUtils { } '''; + static const scriptsHandleContentSizeChanged = ''' + + '''; + static String customCssStyleHtmlEditor({TextDirection direction = TextDirection.ltr}) { if (PlatformInfo.isWeb) { return '''