TF-3264 Fix composer drag drop all modes (#3279)

This commit is contained in:
Dat Dang
2024-11-28 17:46:01 +07:00
committed by Dat H. Pham
parent 50e88d859e
commit 59c5df2a1b
4 changed files with 23 additions and 0 deletions
@@ -13,6 +13,7 @@ typedef OnMouseDownEditorAction = Function();
typedef OnEditorSettingsChange = Function(EditorSettings settings);
typedef OnEditorTextSizeChanged = Function(int? size);
typedef OnDragEnterListener = Function(List<dynamic>? types);
typedef OnDragOverListener = Function(List<dynamic>? types);
typedef OnPasteImageSuccessAction = Function(List<FileUpload> listFileUpload);
typedef OnPasteImageFailureAction = Function(
List<FileUpload>? listFileUpload,
@@ -34,6 +35,7 @@ class WebEditorWidget extends StatefulWidget {
final OnEditorTextSizeChanged? onEditorTextSizeChanged;
final double? height;
final OnDragEnterListener? onDragEnter;
final OnDragOverListener? onDragOver;
final OnPasteImageSuccessAction? onPasteImageSuccessAction;
final OnPasteImageFailureAction? onPasteImageFailureAction;
final OnInitialContentLoadComplete? onInitialContentLoadComplete;
@@ -52,6 +54,7 @@ class WebEditorWidget extends StatefulWidget {
this.onEditorTextSizeChanged,
this.height,
this.onDragEnter,
this.onDragOver,
this.onPasteImageSuccessAction,
this.onPasteImageFailureAction,
this.onInitialContentLoadComplete,
@@ -160,6 +163,7 @@ class _WebEditorState extends State<WebEditorWidget> {
HtmlUtils.lineHeight100Percent.name
),
onDragEnter: widget.onDragEnter,
onDragOver: widget.onDragOver,
onDragLeave: (_) {},
onImageUpload: widget.onPasteImageSuccessAction,
onImageUploadError: widget.onPasteImageFailureAction,