Skip to content

Commit

Permalink
Support Copy & Paste multiple images
Browse files Browse the repository at this point in the history
Signed-off-by: dab246 <[email protected]>
  • Loading branch information
dab246 authored and hoangdat committed Aug 20, 2024
1 parent 3cf2553 commit 8e5471f
Show file tree
Hide file tree
Showing 3 changed files with 4,992 additions and 5,687 deletions.
33 changes: 14 additions & 19 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,26 +125,21 @@ class _HtmlEditorExampleState extends State<HtmlEditorExample> {
debugPrint('codeview either focused or unfocused');
}, onInit: () {
debugPrint('init');
// },
},
//this is commented because it overrides the default Summernote handlers
/*onImageLinkInsert: (String? url) {
debugPrint(url ?? "unknown url");
},
onImageUpload: (FileUpload file) async {
debugPrint(file.name);
debugPrint(file.size);
debugPrint(file.type);
debugPrint(file.base64);
},*/
// onImageUploadError: (FileUpload? file, String? base64Str,
// UploadError error) {
// debugPrint(describeEnum(error));
// debugPrint(base64Str ?? '');
// if (file != null) {
// debugPrint(file.name);
// debugPrint(file.size);
// debugPrint(file.type);
// }
// onImageLinkInsert: (String? url) {
// debugPrint(url ?? "unknown url");
// },
onImageUpload: (files) async {
for (var i = 0; i < files.length; i++ ) {
debugPrint('onImageUpload::INDEX = $i | ${files[i].name}');
debugPrint('onImageUpload::${files[i].size}');
debugPrint('onImageUpload::${files[i].type}');
debugPrint('onImageUpload::${files[i].base64}');
}
},
onImageUploadError: (files, base64Str, error) {
debugPrint('onImageUploadError:: $error');
}, onKeyDown: (int? keyCode) {
debugPrint('$keyCode key downed');
debugPrint(
Expand Down
Loading

0 comments on commit 8e5471f

Please sign in to comment.