|
|
@ -169,6 +169,8 @@ import 'package:desktop_drop/desktop_drop.dart'; |
|
|
|
3. in the configurations of `QuillEditor`, use the `builder` to wrap the editor with `DropTarget` which comes from `desktop_drop` |
|
|
|
3. in the configurations of `QuillEditor`, use the `builder` to wrap the editor with `DropTarget` which comes from `desktop_drop` |
|
|
|
|
|
|
|
|
|
|
|
```dart |
|
|
|
```dart |
|
|
|
|
|
|
|
import 'package:flutter_quill_extensions/flutter_quill_extensions.dart'; |
|
|
|
|
|
|
|
|
|
|
|
QuillEditor.basic( |
|
|
|
QuillEditor.basic( |
|
|
|
configurations: QuillEditorConfigurations( |
|
|
|
configurations: QuillEditorConfigurations( |
|
|
|
padding: const EdgeInsets.all(16), |
|
|
|
padding: const EdgeInsets.all(16), |
|
|
@ -211,6 +213,7 @@ OnDragDoneCallback get _onDragDone { |
|
|
|
); |
|
|
|
); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// To get this extension function please import flutter_quill_extensions |
|
|
|
_controller.insertImageBlock( |
|
|
|
_controller.insertImageBlock( |
|
|
|
imageSource: file.path, |
|
|
|
imageSource: file.path, |
|
|
|
); |
|
|
|
); |
|
|
|