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
95 stars 98 forks source link

[BUG] Web editor sometimes never loads? #130

Open gliitterpuke opened 1 year ago

gliitterpuke commented 1 year 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 1 year ago

image Log for reference

timmer9000 commented 9 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 5 months ago

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

xErik commented 1 month ago

Confirming eternal loading indicator in Firefox using the demo:

https://the-airbender.github.io/