Handle multiple QuillEditors
Is there an existing issue for this?
- [X] I have searched the existing issues
The question
I have two separated QuillEditors in my Flutter app. But whatever I type in the first one automatically appears in the second one. I know it's a matter of controllers but I really couldn't find a way to control them separately. I am using the latest version of the package.
Hello there, on behalf the Flutter Quill Team I would like to thank you for opening your first issue. Your inputs and insights are valuable in shaping a stable and reliable version for all our users. Thank you for being part of the open-source community!
You can wrap QuillProvider for each QuillEditor, that is what I did for my app. If you want all editors to use a same toolbar, then wrap that toolbar with another QuillProvider, and use ChangeNotifier + focusNode to switch the controller
By the way, quill has a lot of issues (they are changing a lot of code, that is understandable) regarding performance and unnecessary editor rebuild, and I also don't like the idea of QuillProvider, its hard to use for many usecases. After spent many days with Quill, I decided to switch to this one https://github.com/fleather-editor/fleather/tree/master/packages/fleather/lib/src
You can wrap QuillProvider for each QuillEditor, that is what I did for my app. If you want all editors to use a same toolbar, then wrap that toolbar with another QuillProvider, and use ChangeNotifier + focusNode to switch the controller
By the way, quill has a lot of issues (they are changing a lot of code, that is understandable) regarding performance and unnecessary editor rebuild, and I also don't like the idea of QuillProvider, its hard to use for many usecases. After spent many days with Quill, I decided to switch to this one https://github.com/fleather-editor/fleather/tree/master/packages/fleather/lib/src
Thank you very much @binhtran93. Yes, I agree the idea of QuillProvider on every QuillEditor isn't a good way to handle multiple QuillEditors. It should be like TextFormFields where every one has its own controller but same toolbar.
You can wrap QuillProvider for each QuillEditor, that is what I did for my app. If you want all editors to use a same toolbar, then wrap that toolbar with another QuillProvider, and use ChangeNotifier + focusNode to switch the controller
By the way, quill has a lot of issues (they are changing a lot of code, that is understandable) regarding performance and unnecessary editor rebuild, and I also don't like the idea of QuillProvider, its hard to use for many usecases. After spent many days with Quill, I decided to switch to this one https://github.com/fleather-editor/fleather/tree/master/packages/fleather/lib/src
Thank you for the report, we will consider this regarding the performance and unnecessary editor rebuild it was an old issue from the older versions and we are working on it
Thank you for the feedbacks, we are already working on a new major version
The issue has been fixed in the dev branch but it will take a few months before the release
We are working on improving the raw quill editor
You can wrap QuillProvider for each QuillEditor, that is what I did for my app. If you want all editors to use a same toolbar, then wrap that toolbar with another QuillProvider, and use ChangeNotifier + focusNode to switch the controller By the way, quill has a lot of issues (they are changing a lot of code, that is understandable) regarding performance and unnecessary editor rebuild, and I also don't like the idea of QuillProvider, its hard to use for many usecases. After spent many days with Quill, I decided to switch to this one https://github.com/fleather-editor/fleather/tree/master/packages/fleather/lib/src
Thank you very much @binhtran93. Yes, I agree the idea of QuillProvider on every QuillEditor isn't a good way to handle multiple QuillEditors. It should be like TextFormFields where everyone has its own controller but the same toolbar.
Thank you for the feedback again, we already dropped the support and use for QuillProvider
Regarding the performance issues we are working on them, we made a lot of breaking changes but that's only in versions 7.0.0 to 8.0.0
Besides Google itself with it products and libraries made a lot of breaking changes all the time so even if we don't want to , we still have to adapt the latest updates
Now we will only work in the dev branch for a while and provide hotfixes for the master
The code changes should not affect the developer much unless it was fixes or breaking changes
I have two separated QuillEditors in my Flutter app. But whatever I type in the first one automatically appears in the second one. I know it's a matter of controllers but I really couldn't find a way to control them separately. I am using the latest version of the package.
Can you give the latest dev version a try? Tell me if it fixed the issue and handle it more efficiently
dev
Thank you very much. I will give it a look later today and you will have my feedback soon.
I have two separated QuillEditors in my Flutter app. But whatever I type in the first one automatically appears in the second one. I know it's a matter of controllers but I really couldn't find a way to control them separately. I am using the latest version of the package.
Can you give the latest dev version a try? Tell me if it fixed the issue and handle it more efficiently
I was really busy lately, so I am sorry for being late.. But I just updated to the latest version .. I can see that you dropped the support for QuillProvider. However, the problem of handling multiple Quill Editors seperately is still there.. One single controller for QuillToolbar and one QuillEditor. If you want to have multiple QuillEditors on the same screen with one QuillToolbar that controls all of them seperately, you can't.
As for your last reply here, I can see the dev verison now has been updated 60 days ago.