TF-2116 Persist new signature when open draft email
(cherry picked from commit 4bf72a6e31855061b232fe3c6bab483bcb3f264a)
This commit is contained in:
@@ -4,18 +4,21 @@ import 'package:flutter/material.dart';
|
||||
import 'package:rich_text_composer/rich_text_composer.dart';
|
||||
|
||||
typedef OnCreatedEditorAction = Function(BuildContext context, HtmlEditorApi editorApi, String content);
|
||||
typedef OnLoadCompletedEditorAction = Function(HtmlEditorApi editorApi, WebUri? url);
|
||||
|
||||
class MobileEditorWidget extends StatelessWidget {
|
||||
|
||||
final String content;
|
||||
final TextDirection direction;
|
||||
final OnCreatedEditorAction onCreatedEditorAction;
|
||||
final OnLoadCompletedEditorAction onLoadCompletedEditorAction;
|
||||
|
||||
const MobileEditorWidget({
|
||||
super.key,
|
||||
required this.content,
|
||||
required this.direction,
|
||||
required this.onCreatedEditorAction,
|
||||
required this.onLoadCompletedEditorAction,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -26,7 +29,8 @@ class MobileEditorWidget extends StatelessWidget {
|
||||
addDefaultSelectionMenuItems: false,
|
||||
initialContent: content,
|
||||
customStyleCss: HtmlUtils.customCssStyleHtmlEditor(direction: direction),
|
||||
onCreated: (editorApi) => onCreatedEditorAction.call(context, editorApi, content)
|
||||
onCreated: (editorApi) => onCreatedEditorAction.call(context, editorApi, content),
|
||||
onCompleted: onLoadCompletedEditorAction,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,9 +66,9 @@ class _WebEditorState extends State<WebEditorWidget> {
|
||||
shouldEnsureVisible: true,
|
||||
hint: '',
|
||||
darkMode: false,
|
||||
initialText: widget.content,
|
||||
customBodyCssStyle: HtmlUtils.customCssStyleHtmlEditor(direction: widget.direction),
|
||||
),
|
||||
blockQuotedContent: widget.content,
|
||||
htmlToolbarOptions: const HtmlToolbarOptions(
|
||||
toolbarType: ToolbarType.hide,
|
||||
defaultToolbarButtons: []
|
||||
|
||||
Reference in New Issue
Block a user