the-airbender / quill_html_editor

HTML rich text editor for Android, iOS, and Web, using the QuillJS library. QuillJS is a free, open source WYSIWYG editor built for the modern web.
https://pub.dev/packages/quill_html_editor
MIT License
77 stars 77 forks source link

[BUG] Web editor sometimes never loads? #130

Open gliitterpuke opened 9 months ago

gliitterpuke commented 9 months ago

On Firefox web, a user reported the editor consistently being in a loading state. No adblockers on.

Code attached here:

 ToolBar(
                          toolBarConfig: customToolBarList,
                          padding: const EdgeInsets.all(8),
                          iconSize: 25,
                          activeIconColor: AppColors.accent,
                          controller: controller,
                          crossAxisAlignment: WrapCrossAlignment.start,
                          direction: Axis.horizontal,
                        ),
                        QuillHtmlEditor(
                          hintText: 'Once upon a time...',
                          controller: controller,
                          isEnabled: true,
                          ensureVisible: false,
                          minHeight: 500,
                          autoFocus: false,
                          hintTextAlign: TextAlign.start,
                          padding: const EdgeInsets.only(left: 10, top: 10),
                          hintTextPadding: const EdgeInsets.only(left: 20),
                          inputAction: InputAction.newline,
                          onEditingComplete: (s) =>
                              debugPrint('Editing completed $s'),
                          loadingBuilder: (context) {
                            return const Center(
                                child: CircularProgressIndicator(
                              strokeWidth: 1,
                              color: Colors.red,
                            ));
                          },
                          onFocusChanged: (focus) {
                            debugPrint('has focus $focus');
                            setState(() {});
                          },
                          onEditorCreated: () {
                            debugPrint('Editor has been loaded');
                          },
                          onSelectionChanged: (sel) => debugPrint(
                              'index ${sel.index}, range ${sel.length}'),
                        ),
gliitterpuke commented 9 months ago

image Log for reference

timmer9000 commented 4 months ago

I am a newb and am not sure if this is related, but I had the editor working fine since Oct last year. After upgrading to dart 3.3 & flutter 3.19.2 the editor doesn't seem to ever finish loading. It does from a practical standpoint in the sense that you can use the editor but onEditorCreated never gets called so you can't set default text and also the circularProgressIndicator shows forever. At one stage it would work like 20% of the time, indicating some type of timing issue. But now I can't seem to ever get it to work. I also downloaded the Example code you provide and had the same experience - my target platform is web.

toknT commented 2 weeks ago

@timmer9000 To me on Android ,downgrade to 2.2.7 solve the problem . And I am using flutter 3.22.2