diff --git a/lib/features/composer/presentation/widgets/mobile/mobile_editor_widget.dart b/lib/features/composer/presentation/widgets/mobile/mobile_editor_widget.dart index e4f3d9b49..640157555 100644 --- a/lib/features/composer/presentation/widgets/mobile/mobile_editor_widget.dart +++ b/lib/features/composer/presentation/widgets/mobile/mobile_editor_widget.dart @@ -89,6 +89,10 @@ class _MobileEditorState extends State with TextSelectionMix Future _onWebViewCreated(HtmlEditorApi editorApi) async { widget.onCreatedEditorAction.call(context, editorApi, widget.content); + } + + Future _onWebViewCompleted(HtmlEditorApi editorApi, WebUri? webUri) async { + widget.onLoadCompletedEditorAction(editorApi, webUri); try { await _setupSelectionListener(editorApi); } catch (e) { @@ -96,6 +100,7 @@ class _MobileEditorState extends State with TextSelectionMix } } + @override Widget build(BuildContext context) { return HtmlEditor( @@ -109,7 +114,7 @@ class _MobileEditorState extends State with TextSelectionMix useDefaultFontStyle: true, ), onCreated: _onWebViewCreated, - onCompleted: widget.onLoadCompletedEditorAction, + onCompleted: _onWebViewCompleted, onContentHeightChanged: PlatformInfo.isIOS ? widget.onEditorContentHeightChanged : null, ); }