diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0a9b7268..0cba5b33 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+## [8.4.2]
+- **Breaking change**: The `QuillRawEditor` configurations has been moved to a seperated class, also the `readOnly` has been renamed to `isReadOnly`, if you are using the `QuillEditor` you don't have to change anything
+- Allow the developer to use override the `TextInputAction` in both `QuillRawEditor` and `QuillEditor`
+- You can use now the `QuillRawEditor` without `QuillEditorProvider`
+- Bug fixes
+- Add implementation of image cropping in the `example`
+- Update the `QuillToolbarIconButton` to use the material 3 buttons
+
## [8.4.1]
- Add `copyWith` in `OptionalSize` class
diff --git a/doc/todo.md b/doc/todo.md
index 7b8aa9b8..d31c9c73 100644
--- a/doc/todo.md
+++ b/doc/todo.md
@@ -27,6 +27,7 @@ This is a todo list page that added recently and will be updated soon.
1. Improve the Raw Quill Editor, for more [info](https://github.com/singerdmx/flutter-quill/issues/1509)
2. Provide more support to all the platforms
+ 3. Extract the shared properties between `QuillRawEditorConfigurations` and `QuillEditorConfigurations`
### Bugs
diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
index 1d6e0b64..6176738c 100644
--- a/example/android/app/src/main/AndroidManifest.xml
+++ b/example/android/app/src/main/AndroidManifest.xml
@@ -42,6 +42,12 @@
+
+
+
{
);
}
+ /// When inserting an image
+ OnImageInsertCallback get onImageInsert {
+ return (image, controller) async {
+ final croppedFile = await ImageCropper().cropImage(
+ sourcePath: image,
+ aspectRatioPresets: [
+ CropAspectRatioPreset.square,
+ CropAspectRatioPreset.ratio3x2,
+ CropAspectRatioPreset.original,
+ CropAspectRatioPreset.ratio4x3,
+ CropAspectRatioPreset.ratio16x9
+ ],
+ uiSettings: [
+ AndroidUiSettings(
+ toolbarTitle: 'Cropper',
+ toolbarColor: Colors.deepOrange,
+ toolbarWidgetColor: Colors.white,
+ initAspectRatio: CropAspectRatioPreset.original,
+ lockAspectRatio: false,
+ ),
+ IOSUiSettings(
+ title: 'Cropper',
+ ),
+ WebUiSettings(
+ context: context,
+ ),
+ ],
+ );
+ final newImage = croppedFile?.path;
+ if (newImage == null) {
+ return;
+ }
+ controller.insertImageBlock(imageSource: newImage);
+ };
+ }
+
QuillToolbar get quillToolbar {
final customButtons = [
QuillToolbarCustomButtonOptions(
@@ -481,13 +518,14 @@ class _HomePageState extends State {
configurations: QuillToolbarConfigurations(
customButtons: customButtons,
embedButtons: FlutterQuillEmbeds.toolbarButtons(
+ cameraButtonOptions: const QuillToolbarCameraButtonOptions(),
imageButtonOptions: QuillToolbarImageButtonOptions(
imageButtonConfigurations: QuillToolbarImageConfigurations(
onImageInsertedCallback: (image) async {
_onImagePickCallback(File(image));
},
+ onImageInsertCallback: onImageInsert,
),
- // webImagePickImpl: _webImagePickImpl,
),
),
buttonOptions: QuillToolbarButtonOptions(
@@ -496,7 +534,6 @@ class _HomePageState extends State {
),
),
),
- // afterButtonPressed: _focusNode.requestFocus,
);
}
if (isDesktop(supportWeb: false)) {
@@ -504,6 +541,7 @@ class _HomePageState extends State {
configurations: QuillToolbarConfigurations(
customButtons: customButtons,
embedButtons: FlutterQuillEmbeds.toolbarButtons(
+ cameraButtonOptions: const QuillToolbarCameraButtonOptions(),
imageButtonOptions: QuillToolbarImageButtonOptions(
imageButtonConfigurations: QuillToolbarImageConfigurations(
onImageInsertedCallback: (image) async {
@@ -525,6 +563,7 @@ class _HomePageState extends State {
configurations: QuillToolbarConfigurations(
customButtons: customButtons,
embedButtons: FlutterQuillEmbeds.toolbarButtons(
+ cameraButtonOptions: const QuillToolbarCameraButtonOptions(),
videoButtonOptions: QuillToolbarVideoButtonOptions(
videoConfigurations: QuillToolbarVideoConfigurations(
onVideoInsertedCallback: (video) =>
@@ -533,6 +572,7 @@ class _HomePageState extends State {
),
imageButtonOptions: QuillToolbarImageButtonOptions(
imageButtonConfigurations: QuillToolbarImageConfigurations(
+ onImageInsertCallback: onImageInsert,
onImageInsertedCallback: (image) async {
_onImagePickCallback(File(image));
},
diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index 5ff55f23..ccdf1958 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -17,10 +17,11 @@ dependencies:
path_provider: ^2.1.1
# filesystem_picker: ^4.0.0
file_picker: ^6.1.1
- flutter_quill: ^8.2.5
- flutter_quill_extensions: ^0.6.3
+ flutter_quill: ^8.4.1
+ flutter_quill_extensions: ^0.6.5
path: ^1.8.3
desktop_drop: ^0.4.4
+ image_cropper: ^5.0.0
dependency_overrides:
flutter_quill:
diff --git a/example/web/index.html b/example/web/index.html
index 45cf2ca3..1029dffd 100644
--- a/example/web/index.html
+++ b/example/web/index.html
@@ -32,6 +32,11 @@
example
+
+
+
+
+