Code Monkey home page Code Monkey logo

html-editor-enhanced's People

Contributors

afandiyusuf avatar altotunchitoo avatar dab246 avatar eliudio avatar jeuler avatar kimmanwky avatar ksilz avatar manjotsidhu avatar opimand avatar sstasi95 avatar steveshaw9899 avatar thecarpetmerchant avatar tneotia avatar xrb21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

html-editor-enhanced's Issues

Insert html issue

I am trying to insert audio with base 64 but having issue
Inserting Html contents :-

> <audio controls="controls"  autoplay="autoplay">
>     <source src="data:audio/wav;base64,UklGRhwMAABXQVZFZm10IBAAAAABAAEAgD4AAIA+AAABAAgAZGF0Ya4LAACAgICAgICAgICAgICAgICAgICAgICAgICAf3hxeH+AfXZ1eHx6dnR5fYGFgoOKi42aloubq6GOjI2Op7ythXJ0eYF5aV1AOFFib32HmZSHhpCalIiYi4SRkZaLfnhxaWptb21qaWBea2BRYmZTVmFgWFNXVVVhaGdbYGhZbXh1gXZ1goeIlot1k6yxtKaOkaWhq7KonKCZoaCjoKWuqqmurK6ztrO7tbTAvru/vb68vbW6vLGqsLOfm5yal5KKhoyBeHt2dXBnbmljVlJWUEBBPDw9Mi4zKRwhIBYaGRQcHBURGB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YCBgICAgICAgICAf4B/f4B/gH+Af35/fn9+f35/fn1+fn19fn1+fX59fn19fX19fH18fXx9fH18fXx9fH18fXx8fHt8e3x7fHt8e3x7fHt8e3x7fHt8e3x7fHt8e3x7fHt8e3x8e3x7fHt8e3x7fHx8fXx9fH18fX5+fX59fn9+f35+f35/gH+Af4B/gICAgICAgICAgICAgYCBgIGAgIGAgYGBgoGCgYKBgoGCgYKBgoGCgoKDgoOCg4KDgoOCg4KDgoOCg4KDgoOCg4KDgoOCg4KDgoOCg4KDgoOCg4KDgoOCg4KDgoOCg4KDgoOCg4KCgoGCgYKBgoGCgYKBgoGCgYKBgoGCgYKBgoGCgYKBgoGCgYKBgoGCgYKBgoGBgYCBgIGAgYCBgIGAgYCBgIGAgYCBgIGAgYCBgIGAgYCAgICBgIGAgYCBgIGAgYCBgIGAgYCBgExJU1RCAAAASU5GT0lDUkQMAAAAMjAwOC0wOS0yMQAASUVORwMAAAAgAAABSVNGVBYAAABTb255IFNvdW5kIEZvcmdlIDguMAAA" />
> </audio>

Getting this in output :-

Uncaught SyntaxError: Invalid or unexpected token

Is there dispose method?

On parent widget closing (back button click), html_editor keep dispayed for few seconds and disappears. How to avoid this? is there any dispose method?

[BUG] onImageUpload override

Hi!, I'm overriding the onImageUpload callback to block addition of images, but even overriding the function and return null, the image still added. Is there way to solve this problem?

Code with reproduce the problem:

HtmlEditor(
                controller: controller,
                htmlEditorOptions: HtmlEditorOptions(
                  hint: 'Your text here...',
                  shouldEnsureVisible: true,
                  //initialText: "<p>text content initial, if any</p>",
                ),
                htmlToolbarOptions: HtmlToolbarOptions(
                  toolbarPosition: ToolbarPosition.aboveEditor, //by default
                  toolbarType: ToolbarType.nativeScrollable, //by default
                  onButtonPressed: (ButtonType type, bool? status,
                      Function()? updateStatus) {
                    print(
                        "button '${describeEnum(type)}' pressed, the current selected status is $status");
                    return true;
                  },
                  onDropdownChanged: (DropdownType type, dynamic changed,
                      Function(dynamic)? updateSelectedItem) {
                    print(
                        "dropdown '${describeEnum(type)}' changed to $changed");
                    return true;
                  },
                  mediaLinkInsertInterceptor:
                      (String url, InsertFileType type) {
                    print(url);
                    return true;
                  },
                  mediaUploadInterceptor:
                      (PlatformFile file, InsertFileType type) async {
                    print(file.name); //filename
                    print(file.size); //size in bytes
                    print(file.extension); //file extension (eg jpeg or mp4)
                    return true;
                  },
                ),
                otherOptions: OtherOptions(height: 550),
                callbacks: Callbacks(onBeforeCommand: (String? currentHtml) {
                  print('html before change is $currentHtml');
                }, onChange: (String? changed) {
                  print('content changed to $changed');
                }, onChangeCodeview: (String? changed) {
                  print('code changed to $changed');
                }, onDialogShown: () {
                  print('dialog shown');
                }, onEnter: () {
                  print('enter/return pressed');
                }, onFocus: () {
                  print('editor focused');
                }, onBlur: () {
                  print('editor unfocused');
                }, onBlurCodeview: () {
                  print('codeview either focused or unfocused');
                }, onInit: () {
                  print('init');
                },
                    onImageLinkInsert: (str){
                  return null;
                    },
                  onImageUpload: (FileUpload file) async {
                    return null;
                  },
                    onImageUploadError: (FileUpload? file, String? base64Str,
                        UploadError error) {
                      print(describeEnum(error));
                      print(base64Str ?? '');
                      if (file != null) {
                        print(file.name);
                        print(file.size);
                        print(file.type);
                      }
                    }, onKeyDown: (int? keyCode) {
                      print('$keyCode key downed');
                    }, onKeyUp: (int? keyCode) {
                      print('$keyCode key released');
                    }, onMouseDown: () {
                      print('mouse downed');
                    }, onMouseUp: () {
                      print('mouse released');
                    }, onPaste: () {
                      print('pasted into editor');
                    }, onScroll: () {
                      print('editor scrolled');
                    }),
                plugins: [
                  SummernoteAtMention(
                      getSuggestionsMobile: (String value) {
                        var mentions = <String>['test1', 'test2', 'test3'];
                        return mentions
                            .where((element) => element.contains(value))
                            .toList();
                      },
                      mentionsWeb: ['test1', 'test2', 'test3'],
                      onSelect: (String value) {
                        print(value);
                      }),
                ],
              ),

Fullscreen by defauld

Hey, man. awesome work. This is excellent. Now I can use it in web. Thank you!!!

How can I set fullscreen by default?
That bottom part takes up a lot of space and doesn't help me at all

[BUG] type 'double' is not a subtype of type 'int?'

Describe the bug
VERBOSE-2:ui_dart_state.cc(186)] Unhandled Exception: type 'double' is not a subtype of type 'int?' in type cast
#0 _HtmlEditorWidgetMobileState.build.
package:html_editor_enhanced/…/widgets/html_editor_widget_mobile.dart:294

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Device:
Add device details here.

Additional context
Add any other context about the problem here.

Cannot read this html text as initialText

Hi, html-editor-enhanced cannot read the following html text as initialText, it dont show any text in html-editor-enhanced textbox.
It shows this error message in the Terminal:
I/flutter ( 5266): Uncaught SyntaxError: missing ) after argument list

<div><span style="color:rgb(74,74,74);font-family:'Google Sans', Roboto, sans-serif;">System requirements</span><br /></div><div><p style="color:rgb(74,74,74);font-family:Roboto, sans-serif;">To install and run Flutter, your development environment must meet these minimum requirements:</p><ul style="color:rgb(74,74,74);font-family:Roboto, sans-serif;"><li><span style="font-weight:bolder;">Operating Systems</span>: Windows 7 SP1 or later (64-bit), x86-64 based</li><li><span style="font-weight:bolder;">Disk Space</span>: 1.64 GB (does not include disk space for IDE/tools).</li><li><span style="font-weight:bolder;">Tools</span>: Flutter depends on these tools being available in your environment.<ul><li><a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-windows-powershell" style="color:rgb(19,137,253);">Windows PowerShell 5.0</a> or newer (this is pre-installed with Windows 10)</li><li><p><a href="https://git-scm.com/download/win" style="color:rgb(19,137,253);">Git for Windows</a> 2.x, with the <span style="font-weight:bolder;">Use Git from the Windows Command Prompt</span> option.</p><p>If Git for Windows is already installed, make sure you can run <code class="language-plaintext highlighter-rouge" style="font-family:'Roboto Mono', monospace;font-size:14px;color:rgb(0,143,131);">git</code> commands from the command prompt or PowerShell.</p></li></ul></li></ul><h2 style="margin:0px;font-family:'Google Sans', Roboto, sans-serif;line-height:1.2;clear:both;color:rgb(74,74,74);"><a class="anchor" href="https://flutter.dev/docs/get-started/install/windows#get-the-flutter-sdk" style="color:rgb(19,137,253);float:left;"><span class="octicon octicon-link" style="font-family:'Font Awesome 5 Free';font-weight:900;line-height:1;color:rgb(74,74,74);vertical-align:middle;"></span></a>Get the Flutter SDK</h2><ol style="color:rgb(74,74,74);font-family:Roboto, sans-serif;"><li><p>Download the following installation bundle to get the latest stable release of the Flutter SDK:</p><p>For other release channels, and older builds, see the <a href="https://flutter.dev/docs/development/tools/sdk/releases" style="color:rgb(19,137,253);">SDK releases</a> page.</p></li><li><p>Extract the zip file and place the contained <code class="language-plaintext highlighter-rouge" style="font-family:'Roboto Mono', monospace;font-size:14px;color:rgb(0,143,131);">flutter</code> in the desired installation location for the Flutter SDK (for example, <code class="language-plaintext highlighter-rouge" style="font-family:'Roboto Mono', monospace;font-size:14px;color:rgb(0,143,131);">C:\src\flutter</code>).</p></li></ol></div>

How to solve it, thanks

[BUG] No text on the insert image from file button

Describe the bug
When i click the image icon in the toolbar. There is a button available without text.

To Reproduce
Steps to reproduce the behavior:

  1. Click on the image icon on the toolbar

Expected behavior
Show a text like "upload" inside the button.

Screenshots
image

Device:
Windows 10 Google Chrome

Web page not found when inserting video url

Web page not found is showing in editor whenever I am trying to insert the video url from insert Video Url.
but when was checking Code view I got this :

<p><iframe frameborder="0" src="//www.youtube.com/embed/W1pNjxmNHNQ" width="640" height="360" class="note-video-clip"></iframe><br></p>

In above I append https: in src then it's working fine.

<p><iframe frameborder="0" src="https://www.youtube.com/embed/W1pNjxmNHNQ" width="640" height="360" class="note-video-clip"></iframe><br></p>

It's issue is coming only in mobile platform. on web it's working. please add this changes in iframe of lib/summernote/summernote-lite.min.js

[BUG] iOS does not accept any key inputs

Describe the bug
Not accepting any key inputs in the ios version with the latest flutter version. please check on this. Thanks

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Device:
Add device details here.

Additional context
Add any other context about the problem here.

Error messages in Terminal [BUG]

I implemented html-editor-enhanced in a separate class as you see

import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';
import 'dart:async';
import 'dart:core';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:html_editor_enhanced/html_editor.dart';
import 'dart:convert';
import 'dart:io';


class html_textbox extends StatefulWidget {
  String value;
  html_textbox(this.value);

  @override
  _html_textboxState createState() => _html_textboxState();
}

class _html_textboxState extends State<html_textbox> {
  final HtmlEditorController controller = HtmlEditorController();

  @override
  void initState() {

    super.initState();

  }

  @override
  void dispose() {
    super.dispose();

  }




   return_back_html_text(BuildContext context) async{
     final result = await controller.getText();

      Navigator.pop(context, result);
   
  }


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(

        title: Text('Change text', textScaleFactor: 1,),
        actions: [
          TextButton(onPressed: () async{

            return_back_html_text(context);

          }, child: Row(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Icon(Icons.check, color: Colors.white, size: 25,),
              Text(' Save', textScaleFactor:  1.2, style: TextStyle(color: Colors.white),),
            ],
          )),
        ],
      ),

      body:   SingleChildScrollView(
    child: Column(
    mainAxisAlignment: MainAxisAlignment.center,
    children: <Widget>[
          HtmlEditor(
            controller: controller,
            hint: "Skriv här...",
            initialText:  widget.value,

            options: HtmlEditorOptions(
            height: 400,
              showBottomToolbar: false,
              autoAdjustHeight: false,
              adjustHeightForKeyboard: false,
              shouldEnsureVisible: true
            ),

            toolbar: [
             Style(),
              Font(buttons: [FontButtons.bold,  FontButtons.italic, FontButtons.clear, FontButtons.underline],),
            ],

     
          /*  callbacks: Callbacks(
              onChange: (String changed) {
                //  value = changed;
                print("content changed to $changed");
              },
              onEnter: () {
                print("enter/return pressed");
              },
              onFocus: () {
                print("editor focused");
              },
              onBlur: () {
                print("editor unfocused");
              },
              onBlurCodeview: () {
                print("codeview either focused or unfocused");
              },
              onInit: () {
                print("init");
              },
              onKeyDown: (int keyCode) {
                print("$keyCode key downed");
              },
              onKeyUp: (int keyCode) {
                print("$keyCode key released");
              },
              onPaste: () {
                print("pasted into editor");
              },
            ),*/

          ),


          Container(
            margin: EdgeInsets.only(left: 15, right: 15),
            child: OutlineButton(
                onPressed: () async{

              await return_back_html_text(context);

            }, child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Icon(Icons.check, color: Colors.green, size: 25,),
                Text(' Save', textScaleFactor:  1.2, style: TextStyle(color: Colors.green),),
              ],
            ),
              shape: new RoundedRectangleBorder(
                  borderRadius: new BorderRadius.circular(30.0)),
              borderSide: BorderSide(
                color: Colors.green, //Color of the border
                style: BorderStyle.solid, //Style of the border
                width: 1.0, //width of the border
              ),),
          ),
        ],
      ),
      ),
    );
  }
}

The problem I do Navigator.push to this page, I could open the page but it shows the following error messages in terminal

E/flutter (14486): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: type 'double' is not a subtype of type 'int?' in type cast
E/flutter (14486): #0      _HtmlEditorWidgetMobileState.build.<anonymous closure> (package:html_editor_enhanced/src/widgets/html_editor_widget_mobile.dart:303:57)
E/flutter (14486): #1      _HtmlEditorWidgetMobileState.build.<anonymous closure> (package:html_editor_enhanced/src/widgets/html_editor_widget_mobile.dart:168:23)
E/flutter (14486): #2      InAppWebViewController.handleMethod (package:flutter_inappwebview/src/in_app_webview/in_app_webview_controller.dart:123:34)
E/flutter (14486): #3      MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:435:55)
E/flutter (14486): #4      MethodChannel.setMethodCallHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:382:34)
E/flutter (14486): #5      _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:284:33)
E/flutter (14486): #6      _invoke3.<anonymous closure> (dart:ui/hooks.dart:221:15)
E/flutter (14486): #7      _rootRun (dart:async/zone.dart:1354:13)
E/flutter (14486): #8      _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (14486): #9      _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (14486): #10     _invoke3 (dart:ui/hooks.dart:220:10)
E/flutter (14486): #11     PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:457:7)
E/flutter (14486): #12     _dispatchPlatformMessage (dart:ui/hooks.dart:90:31)
E/flutter (14486): 

When I click on Save button, it works I got the text I wrote correctly, but it shows the following error messages in terminal

E/chromium(14486): [ERROR:aw_browser_terminator.cc(125)] Renderer process (19914) crash detected (code -1).
E/flutter (14486): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Bad state: Cannot add new events after calling close
E/flutter (14486): #0      _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:243:24)
E/flutter (14486): #1      _HtmlEditorWidgetMobileState.build.<anonymous closure> (package:html_editor_enhanced/src/widgets/html_editor_widget_mobile.dart:100:23)
E/flutter (14486): #2      _HtmlEditorWidgetMobileState.build.<anonymous closure> (package:html_editor_enhanced/src/widgets/html_editor_widget_mobile.dart:99:28)
E/flutter (14486): #3      VisibilityDetectorLayer._fireCallback (package:visibility_detector/src/visibility_detector_layer.dart:261:24)
E/flutter (14486): #4      VisibilityDetectorLayer._processCallbacks (package:visibility_detector/src/visibility_detector_layer.dart:220:15)
E/flutter (14486): #5      _TaskEntry.run.<anonymous closure> (package:flutter/src/scheduler/binding.dart:80:34)
E/flutter (14486): #6      Timeline.timeSync (dart:developer/timeline.dart:163:22)
E/flutter (14486): #7      _TaskEntry.run (package:flutter/src/scheduler/binding.dart:77:16)
E/flutter (14486): #8      SchedulerBinding.handleEventLoopCallback (package:flutter/src/scheduler/binding.dart:460:15)
E/flutter (14486): #9      SchedulerBinding._runTasks (package:flutter/src/scheduler/binding.dart:438:9)
E/flutter (14486): #10     _rootRun (dart:async/zone.dart:1346:47)
E/flutter (14486): #11     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (14486): #12     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (14486): #13     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter (14486): #14     _rootRun (dart:async/zone.dart:1354:13)
E/flutter (14486): #15     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (14486): #16     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1186:23)
E/flutter (14486): #17     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
E/flutter (14486): #18     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:395:19)
E/flutter (14486): #19     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:426:5)
E/flutter (14486): #20     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
E/flutter (14486): 

What is the problem?
Another issuse is sometimes it shows the default toolbar even if you specified which buttons I want to show,

Thanks for your good work.

_HtmlEditorWidgetMobileState Unhandled Exception: setState() called after dispose()

When I call await controller.getText() it return the result correct, but it shows these error messages in terminal:

E/chromium(16000): [ERROR:aw_browser_terminator.cc(125)] Renderer process (16047) crash detected (code -1).
E/flutter (16000): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: setState() called after dispose(): _HtmlEditorWidgetMobileState#e447c(lifecycle state: defunct, not mounted)
E/flutter (16000): This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
E/flutter (16000): The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree.
E/flutter (16000): This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().
E/flutter (16000): #0      State.setState.<anonymous closure> (package:flutter/src/widgets/framework.dart:1231:9)
E/flutter (16000): #1      State.setState (package:flutter/src/widgets/framework.dart:1266:6)
E/flutter (16000): #2      _HtmlEditorWidgetMobileState.resetHeight (package:html_editor_enhanced/src/widgets/html_editor_widget_mobile.dart:89:5)
E/flutter (16000): #3      _HtmlEditorWidgetMobileState.build.<anonymous closure>.<anonymous closure> (package:html_editor_enhanced/src/widgets/html_editor_widget_mobile.dart:465:29)
E/flutter (16000): #4      _rootRunUnary (dart:async/zone.dart:1362:47)
E/flutter (16000): #5      _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (16000): #6      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (16000): #7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter (16000): #8      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
E/flutter (16000): #9      _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:386:20)
E/flutter (16000): #10     _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:323:15)
E/flutter (16000): #11     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:385:5)
E/flutter (16000): #12     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:244:5)
E/flutter (16000): #13     _AsBroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:475:11)
E/flutter (16000): #14     _rootRunUnary (dart:async/zone.dart:1362:47)
E/flutter (16000): #15     _CustomZone.runUnary (dart:async/zone.dart:1265:19)
E/flutter (16000): #16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
E/flutter (16000): #17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter (16000): #18     _DelayedData.perform (dart:async/stream_impl.dart:591:14)
E/flutter (16000): #19     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
E/flutter (16000): #20     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:663:7)
E/flutter (16000): #21     _rootRun (dart:async/zone.dart:1346:47)
E/flutter (16000): #22     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (16000): #23     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (16000): #24     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter (16000): #25     _rootRun (dart:async/zone.dart:1354:13)
E/flutter (16000): #26     _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (16000): #27     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (16000): #28     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter (16000): #29     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter (16000): #30     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
E/flutter (16000): 
E/flutter (16000): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: MissingPluginException(No implementation found for method clearFocus on channel com.pichillilorenzo/flutter_inappwebview_0)
E/flutter (16000): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7)
E/flutter (16000): <asynchronous suspension>
E/flutter (16000): #1      InAppWebViewController.clearFocus (package:flutter_inappwebview/src/in_app_webview/in_app_webview_controller.dart:1795:12)
E/flutter (16000): <asynchronous suspension>
E/flutter (16000): 

Thanks for your work.

Web and other support

Type question here.
Wow amazing package and it works amazing right out of the gate. Just wondering if there will be web support in the future? Thank you

Terminal error messages

I upgraded to html_editor_enhanced 2.0.1 today, it works well, thanks for your work. I have html-editor-enhanced in separate page and when I do the following

    final result = await controller.getText(); 

    if( Navigator.canPop(context) == true) {
      Navigator.pop(context, result);
    }

It show the following error messages in Terminal:

W/ImageReader_JNI(14972): Unable to acquire a buffer item, very likely client tried to acquire more than maxImages buffers
E/flutter (14972): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Bad state: No element
E/flutter (14972): #0      Stream.first.<anonymous closure> (dart:async/stream.dart:1213:9)
E/flutter (14972): #1      _rootRun (dart:async/zone.dart:1346:47)
E/flutter (14972): #2      _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (14972): #3      _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (14972): #4      _DoneStreamSubscription._sendDone (dart:async/stream_impl.dart:785:36)
E/flutter (14972): #5      _rootRun (dart:async/zone.dart:1354:13)
E/flutter (14972): #6      _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (14972): #7      _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (14972): #8      _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter (14972): #9      _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter (14972): #10     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
E/flutter (14972): 
E/flutter (14972): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Bad state: No element
E/flutter (14972): #0      Stream.first.<anonymous closure> (dart:async/stream.dart:1213:9)
E/flutter (14972): #1      _rootRun (dart:async/zone.dart:1346:47)
E/flutter (14972): #2      _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (14972): #3      _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (14972): #4      _DoneStreamSubscription._sendDone (dart:async/stream_impl.dart:785:36)
E/flutter (14972): #5      _rootRun (dart:async/zone.dart:1354:13)
E/flutter (14972): #6      _CustomZone.run (dart:async/zone.dart:1258:19)
E/flutter (14972): #7      _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
E/flutter (14972): #8      _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
E/flutter (14972): #9      _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter (14972): #10     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
E/flutter (14972): 
I/flutter (14972): setState() called after dispose(): ToolbarWidgetState#c9475(lifecycle state: defunct, not mounted)
I/flutter (14972): This error happens if you call setState() on a State object for a widget that no longer appears in the widget tree (e.g., whose parent widget no longer includes the widget in its build). This error can occur when code calls setState() from a timer or an animation callback.
I/flutter (14972): The preferred solution is to cancel the timer or stop listening to the animation in the dispose() callback. Another solution is to check the "mounted" property of this object before calling setState() to ensure the object is still in the tree.
I/flutter (14972): This error might indicate a memory leak if setState() is being called because another object is retaining a reference to this State object after it has been removed from the tree. To avoid memory leaks, consider breaking the reference to this object during dispose().
E/chromium(14972): [ERROR:aw_browser_terminator.cc(125)] Renderer process (15434) crash detected (code -1).
W/ImageReader_JNI(14972): Unable to acquire a buffer item, very likely client tried to acquire more than maxImages buffers

[BUG] stylebutton options does not work

Describe the bug

  1. the editor resets when trying to change options on any of the defaultToolbarButtons.
  2. If some text is selected and then trying apply styles on it (for e.g, 'Header-1') does not work.

To Reproduce
Steps to reproduce the behavior:

  1. Open app in chrome
  2. Click on stylebutton options
  3. Scroll down to 'Header-1'
  4. See error:
    Flutter: restoring WebGL context.
    Flutter: restoring WebGL context.
    Flutter: restoring WebGL context.
    Flutter: restoring WebGL context.
    done

Expected behavior

  1. selected option should remain steady and be applied to the text in scope

Device:
Chome

Other context
Version:
html_editor_enhanced: ^2.0.1

[QUESTION] Boring text upload message in the top left corner of the page

Hello, i'm using the html-editor and ever when do upload image in text edditing an text is showed in the top left side from page saying "Find file - NameFile ". How i remove it? The image bellow show the message in my page.

Sem título

My CustomHtmlEditor:

return Theme(
  data: ThemeData(
      primaryColor: Colors.red,
      selectedRowColor: Colors.red,
      textTheme: Theme.of(context).textTheme.apply(
            bodyColor: Theme.of(context).primaryColor,
            displayColor: Theme.of(context).primaryColor,
            decorationColor: Theme.of(context).primaryColor,
          )),
  child: HtmlEditor(
    controller: controller,
    htmlEditorOptions: HtmlEditorOptions(
      hint: "Escreva o texto aqui...",
      initialText: initialText,
    ),
    otherOptions: OtherOptions(
        height: 400,
        ),
    callbacks: Callbacks(
      onChange: onChange,
    ),
    htmlToolbarOptions: HtmlToolbarOptions(
        buttonFocusColor: Theme.of(context).primaryColor,
        buttonColor: Theme.of(context).primaryColor,
        buttonBorderColor: Colors.black,
        buttonFillColor: Theme.of(context).backgroundColor,
        buttonSelectedColor: Theme.of(context).primaryColor,
        dropdownFocusColor: Theme.of(context).primaryColor,
        textStyle: Theme.of(context)
            .textTheme
            .caption!
            .copyWith(color: Theme.of(context).primaryColor),
        toolbarType: ToolbarType.nativeGrid,
        defaultToolbarButtons: [
          StyleButtons(),
          FontSettingButtons(fontSizeUnit: false),
          FontButtons(
              clearAll: false, superscript: false, subscript: false),
          ParagraphButtons(
              increaseIndent: false,
              decreaseIndent: false,
              textDirection: false,
              lineHeight: false,
              caseConverter: false),
          InsertButtons(
            otherFile: false,
          ),
        ]),
  ),
);

How to Display final output

I want to display the final output on the flutter web, but there is no option to display the final output... Can you help me on this
please

controller.getText() doesn't work

HtmlEditor(
                                          controller:
                                              _risk_controller, //required
                                          htmlEditorOptions: HtmlEditorOptions(
                                            hint: "Your text here...",
                                            //initalText: "text content initial, if any",
                                          ),

                                          otherOptions: OtherOptions(
                                            height: 200,
                                          ),
                                         
                                        ),

base code and getting data function :

MaterialButton(
                            color: Colors.blue,
                            elevation: 4,
                            child: Text("Save Alert"),
                            onPressed: () async {
                              var risk = await _risk_controller.getText();
                              _appData.alert["content"]["risk"] = risk;
                              print(_appData.alert.toString());

                              //_appData.addAlert(context);
                            },
                          )```

after clicking on button don't get response.

[QUESTION] Widget resets when scrolling

Hello, I have a problem, when I write in the text editor and scroll so that the editor is hidden, when scrolling back to the editor all content has been redesigned and the text disappears. How to solve this?

I'm build project with --web-renderer html

The video show how occur it:

Projeto.sem.titulo.mp4

The page code:

class AdminAddProjectPageMobile extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final supportStore = Provider.of<SupportStore>(context);
    final teacherFirestore = Provider.of<TeacherFirestore>(context);
    final _picker = ImagePicker();
    final HtmlEditorController contentController = HtmlEditorController();
    final projectFirestore = Provider.of<ProjectFirestore>(context);
    final TextEditingController controllerParticipants =
    TextEditingController();
    final teacherStore = Provider.of<TeacherStore>(context);
    return Observer(
      builder: (ctx) {
        teacherStore.listTeachers?? teacherStore.getTeachers();
        print("xxx");
        switch(teacherStore.listTeachers!.status){
          case FutureStatus.pending:
            return CustomLoading();
          case FutureStatus.fulfilled:
          List<Teacher> listTeachers = teacherStore.listTeachers!.value as List<Teacher>;
          supportStore.createTeacherLocal(listTeachers, null);

          return SingleChildScrollView(
            child: Container(
              width: MediaQuery.of(context).size.width,
              padding: EdgeInsets.all(16.0),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  CustomTextFormField(
                    hintText: "Insira o titulo",
                    labelText: "Titulo",
                    maxCharacters: 30,
                    initialValue: supportStore.titleProject,
                    onChanged: (text) {
                      supportStore.updateTitle(text);
                    },
                    textInputType: TextInputType.name,
                  ),
                  Observer(builder: (_) {
                    return supportStore.msgErrorTitle == ""
                        ? Container()
                        : ErrorMsg(supportStore.msgErrorTitle);
                  }),
                  Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: CustomText("Imagem titulo",
                          style: Theme.of(context).textTheme.headline6)),
                  Observer(
                    builder: (ctx) => Container(
                      decoration: supportStore.pathImage!.path != ""
                          ? BoxDecoration(
                          image: DecorationImage(
                            image: NetworkImage(supportStore.pathImage!.path),
                            fit: BoxFit.fill,
                          ))
                          : BoxDecoration(color: Colors.grey),
                      child: Row(children: [
                        supportStore.pathImage!.path != ""
                            ? Expanded(
                          flex: 95,
                          child: Align(
                            alignment: Alignment.bottomLeft,
                            child: Padding(
                              padding: const EdgeInsets.all(8.0),
                              child: AutoSizeText(
                                supportStore.titleProject,
                                minFontSize: 10,
                                style: Theme.of(context)
                                    .textTheme
                                    .headline3!
                                    .copyWith(fontSize: 30),
                              ),
                            ),
                          ),
                        )
                            : Expanded(flex:85,child: Container()),
                        Spacer(),
                        Expanded(
                          flex: 5,
                          child: InkWell(
                              child: Icon(Icons.folder),
                              onTap: () async {
                                PickedFile? image = await _picker.getImage(
                                    source: ImageSource.camera);
                                supportStore.updatePath(image);
                              }),
                        ),

                      ]),
                      height: supportStore.pathImage!.path == "" ? 40 : 300,
                    ),
                  ),
                  Observer(builder: (_) {
                    return supportStore.msgErrorImage == ""
                        ? Container()
                        : ErrorMsg(supportStore.msgErrorImage);
                  }),
                  CustomHtmlEditor(
                    padding: EdgeInsets.symmetric(vertical: 16.0),
                    controller: contentController,
                    onChange: supportStore.updateContent,

                    initialText: supportStore.htmlContent,
                  ),
                  Observer(builder: (_) {
                    return supportStore.msgErrorContent == ""
                        ? Container()
                        : ErrorMsg(supportStore.msgErrorContent);
                  }),
                  Center(
                    child: CustomText(
                        "Selecione os professores que participam do projeto",
                        style: Theme.of(context).textTheme.subtitle1),
                  ),
                  Observer(builder: (_) {
                    return supportStore.msgErrorTeacher == ""
                        ? Container()
                        : ErrorMsg(supportStore.msgErrorTeacher);
                  }),
                  Observer(
                      builder: (context) => ListView.builder(
                          itemCount: supportStore.teacherLocal.length,
                          shrinkWrap: true,
                          itemBuilder: (ctx, index) {
                            return CustomCheckBox(
                                title: supportStore.teacherLocal[index].name,
                                value: supportStore.teacherLocal[index].checked,
                                onChanged: (_) {
                                  supportStore.updateTeacherLocal(
                                      supportStore.teacherLocal[index], index);
                                });
                          })),
                  SizedBox(
                    height: 40,
                  ),
                  Center(
                    child: CustomText("Escreva os alunos que participam do projeto",
                        style: Theme.of(context).textTheme.subtitle1),
                  ),
                  Observer(builder: (_) {
                    return supportStore.msgErrorParticipants == ""
                        ? Container()
                        : ErrorMsg(supportStore.msgErrorParticipants);
                  }),
                  CustomTextFormField(
                    controller: controllerParticipants,
                    textInputType: TextInputType.number,
                    hintText: "Digite o numero de participantes (Max. 10)",
                    labelText: "Numero de participantes",
                  ),
                  CustomButton(
                      paddingButton: EdgeInsets.all(8.0),
                      expandButton: true,
                      text: "Gerar participantes",
                      onPressed: () {
                        supportStore.validateParticipant(controllerParticipants.text);
                        FocusScope.of(context).unfocus();
                      }),
                  Observer(builder: (_) {
                    return supportStore.msgErrorParticipantsSize == ""
                        ? Container()
                        : ErrorMsg(supportStore.msgErrorParticipantsSize);
                  }),
                  Observer(
                    builder: (context) => ListView.builder(
                      shrinkWrap: true,
                      itemCount: supportStore.participantsLocal.length,
                      itemBuilder: (ctx, index) {
                        return CustomTextFormField(
                          textInputType: TextInputType.name,
                          onChanged: (value) =>
                              supportStore.updateParticipants(value, index),
                          hintText: "Nome Participante ${index + 1}",
                          labelText: 'Participante  ${index + 1}',
                        );
                      },
                    ),
                  ),

                  CustomButton(
                    text: "Criar Projeto",
                    onPressed: () async {
                      if (supportStore.validate()) {
                        var result = await projectFirestore.addProject(
                            supportStore.titleProject,
                            supportStore.pathImage,
                            supportStore.htmlContent,
                            supportStore.getTeachers(),
                            supportStore.getParticipantsLocalFilled(),
                            projectFirestore.username);
                        supportStore.clearData();
                        VxNavigator.of(context)
                            .push(Uri.parse(RouteNames.ADMIN_PROJECTS));
                        if (result) {
                          CustomToast.showToast(
                              "Projeto cadastro com sucesso!!", Colors.green);
                        } else {
                          CustomToast.showToast(
                            "Não foi possivel cadastrar seu projeto, tente novamente mais tarde.",
                            Colors.red,
                          );
                        }
                      }
                    },



                  ),
                ],
              ),
            ),
          );
          case FutureStatus.rejected:
            return ErrorLoad(
              color: Theme.of(context).primaryColor,
            );
        }
      },
    );
  }

The code text editor:

class CustomHtmlEditor extends StatelessWidget{
  final dynamic Function(String?)? onChange;
  final String? initialText;
  final HtmlEditorController controller;
  final dynamic Function()? onInit;
  final EdgeInsets padding;
  final height;
  CustomHtmlEditor(
      {required this.onChange, this.initialText, required this.controller,this.onInit,this.padding=EdgeInsets.zero,this.height=400});

  @override
  Widget build(BuildContext context) {
    return Container(
      height: height,
      child: Theme(
        data: ThemeData(
            primaryColor: Colors.red,
            selectedRowColor: Colors.red,
            textTheme: Theme.of(context).textTheme.apply(
              bodyColor: Theme.of(context).primaryColor,
              displayColor: Theme.of(context).primaryColor,
              decorationColor: Theme.of(context).primaryColor,
            )),
        child: HtmlEditor(

          controller: controller,
          htmlEditorOptions: HtmlEditorOptions(
            hint: "Escreva o texto aqui...",
            initialText: initialText,


          ),

          otherOptions: OtherOptions(
            height: height,

          ),
          callbacks: Callbacks(
            onChange: onChange,
          onFocus: ()=>print("focused"),onBlur: () {
            FocusScope.of(context).unfocus();
          },

          ),
          htmlToolbarOptions: HtmlToolbarOptions(
              mediaLinkInsertInterceptor:
                  (String url, InsertFileType type) {
                print(url);
                return true;
              },

              buttonFocusColor: Theme.of(context).primaryColor,
              buttonColor: Theme.of(context).primaryColor,
              buttonBorderColor: Colors.black,
              buttonFillColor: Theme.of(context).backgroundColor,
              buttonSelectedColor: Theme.of(context).primaryColor,
              dropdownFocusColor: Theme.of(context).primaryColor,
              textStyle: Theme.of(context)
                  .textTheme
                  .caption!
                  .copyWith(color: Theme.of(context).primaryColor),
              toolbarType: ToolbarType.nativeGrid,

              defaultToolbarButtons: [
                StyleButtons(),
                FontSettingButtons(fontSizeUnit: false),
                FontButtons(
                    clearAll: false, superscript: false, subscript: false),
                ParagraphButtons(
                    increaseIndent: false,
                    decreaseIndent: false,
                    textDirection: false,
                    lineHeight: false,
                    caseConverter: false),
                InsertButtons(
                  otherFile: false,
                ),
              ]),
        ),

      ),
    );

[BUG] toolbar option buttons should be visible for any frame size

Describe the bug
defaultToolbarButtons not visible for all types.

To Reproduce
Steps to reproduce the behavior:
See screenshot below

Expected behavior
All toolbar options should be fitted for any dimensions available

Screenshots
toolbar-issue

Device:
Android emulator

Additional context
Version:
html_editor_enhanced: ^2.0.1

I think it used work fine in two versions prior this one.

[BUG] Can't run the app after implement it - Android resource linking failed on build

Describe the bug
I can't run the application after importing the library, even though for configuration I have followed everything in "setup" but it got an error and it can't be run, and it not add the generated_plugin_registrant.dart file

Expected behavior
It should work well

Error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     [My App path]/my_app_name/build/flutter_inappwebview/intermediates/library_manifest/debug/AndroidManifest.xml:7:5-11:15: AAPT: error: unexpected element <queries> found in <manifest>.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 33s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin flutter_inappwebview...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':compileReleaseAidl'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Users/evanezcent/Documents/INSTALLER/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.3.1+1/android/local.properties'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 10s
2

Exception: The plugin flutter_inappwebview could not be built due to the issue above.

Flutter Doctor

[✓] Flutter (Channel stable, 2.0.2, on macOS 11.0.1 20B29 darwin-arm, locale en-ID)
    • Flutter version 2.0.2 at /Users/evanezcent/Documents/INSTALLER/flutter
    • Framework revision 8962f6dc68 (4 weeks ago), 2021-03-11 13:22:20 -0800
    • Engine revision 5d8bf811b3
    • Dart version 2.12.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/evanezcent/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (1 available)
    • SM A205F (mobile) • RR8M40HTWBD • android-arm64 • Android 10 (API 29)

! Doctor found issues in 1 category.

Text direction by default

Type question here.
how can change direction to RTL by default?
and how can change language on values?
thanks

v2.0.0 Community Feature Requests

Hey you! Yes, you! If you'd like to see a particular feature please feel free to leave a comment and I'll look into adding it into the v2.0.0 release!

Before requesting, please see the v2.0.0 wiki for the current roadmap.

Roadmap updates will be available in the README.

Null Aware Operation Errors

Describe the bug
I'm getting null-aware operation warnings when running my app.

To Reproduce
Steps to reproduce the behavior:
Add build 2.1.1 of html-editor-enhanced, run app.

The following shows in the logs.

./../Development/flutter/.pub-cache/hosted/pub.dartlang.org/html_editor_enhanced-2.1.1/lib/src/widgets/toolbar_widget.dart:1830:74: Warning: Operand of null-aware operation '!' has type 'String' which excludes null.
                                                    result!.files.single.name!;
                                                                         ^
../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/html_editor_enhanced-2.1.1/lib/src/widgets/toolbar_widget.dart:1982:74: Warning: Operand of null-aware operation '!' has type 'String' which excludes null.
                                                    result!.files.single.name!;
                                                                         ^

../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/html_editor_enhanced-2.1.1/lib/src/widgets/toolbar_widget.dart:2134:74: Warning: Operand of null-aware operation '!' has type 'String' which excludes null.
                                                    result!.files.single.name!;
                                                                         ^
../../Development/flutter/.pub-cache/hosted/pub.dartlang.org/html_editor_enhanced-2.1.1/lib/src/widgets/toolbar_widget.dart:2286:74: Warning: Operand of null-aware operation '!' has type 'String' which excludes null.
                                                    result!.files.single.name!;
                                                                         ^

Could not find a set of Noto fonts to display all missing characters. Please add a font asset for the missing characters. See: https://flutter.dev/docs/cookbook/design/fonts[BUG]

Could not find a set of Noto fonts to display all missing characters. Please add a font asset for the missing characters. See: https://flutter.dev/docs/cookbook/design/fonts

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://pub.dev/packages/html_editor_enhanced
  2. Get example code
  3. Run example code
  4. See logs

Expected behavior
no errors under "Done"

image

Device:
Chrome

This is not critical in debug mode.
But, if I use "flutter build web" and run, I see that Controller.getText () doesn't work and the method immediately breaks down

[QUESTION] How to ensure the visibility of the bottom toolbar?

I can't figure out how to ensure that the bottom toolbar is visible to the user if the screen height is less than the expected.
I tried to use scrollable views, but the editor become very small.

@override Widget build(BuildContext context) { HtmlEditorController controller = HtmlEditorController(); return Scaffold( appBar: CustomAppBar(title: "Ask ..."), resizeToAvoidBottomInset: true, body: SingleChildScrollView( child: Hero( tag: "question", child: Column( children: [ // ... some widgets, HtmlEditor( controller: controller, htmlToolbarOptions: HtmlToolbarOptions( toolbarPosition: ToolbarPosition.belowEditor, ), otherOptions: OtherOptions( height: 600, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(16)), border: Border.fromBorderSide( BorderSide(color: Color(4293717228), width: 8))), ), ) ], ), ), ), ); }

Bottom toolbar dropdown menu expanding above the keyboard

Problem
When the user selects some text and wants to make it for example Heading 2 style, the dropdown menu expands behind the opened keyboard. This is not much usable, because the user can not select the options which are behind the keyboard.

Solution
It would be better if the whole dropdown menu would expand above the keyboard and if there is not enough space it would be a scrollable dropdown list or something like that.

image

[QUESTION] Problems with drawer over text editor

Hello, i'm with an bug when open drawer and the buttons is above of the text editor. Not get click on button because the cursor stay like were editting (focused) text and when clicked is possible write text with drawer open. Is there a way to solve problem?

Inside the red box is not possible click on drawer buttons.

bug2

link of the example project that reproduces the problem: https://drive.google.com/file/d/1LRvKS8xs2-rtDHOjP99IWth7EPIx5FFq/view?usp=sharing

[QUESTION] How to handle focus?

Hi,
I have a question regarding the focus of the editor. I couldn't figure out how to handle it, especially how to request or unfocus it programmaticaly. I tried controller.setFocus() and controller.clearFocus() but both did not seem to work.
Another question: Is it possible to define the keyboard type ?

[FEATURE]<Font color> and <Font size> incompatible with Flutter_html package

Hi guys,
You made a beautiful package, I love this so much cause I can edit my html by flutter on my devices.
But I got a issue recently, when I export my html and read it by another package (flutter_html), the font element doesn't support cause they just support html5 . I have to change it to span element with style color and font-size to work normally.
I don't know if you have a function to export to html5 to support this case.

[BUG]click the editor then cursor is at second line

Describe the bug
click editor then cursor is at second line

To Reproduce
build it like my code(in Additional context) and click the editor

Expected behavior
click editor then cursor is at first line

Screenshots

Device:
android 9,real

Additional context

Expanded(
            child: HtmlEditor(
              controller: controller, //required
              hint: "Your text here...",
              options: HtmlEditorOptions(
                height: 400,
              ),
            ),
          )

How to avoid reset after losing focus? [QUESTION]

Hello, and thanks for the great widget.

I have three tabs on a flutter web widget (within a scaffold/tabcontroller). Every tab hosts an HtmlEditor with its onw controller. Whenever I switch between tabs, the context of the editor gets lost and the initial value is restored (the widget is redrawn). Can I save the content and set the initial value on losing focus or is it possible to simply keep the changes cached? I had a look at the callbacks already and the settext methods, but I could not find any solution that suited my needs.

Your help would be greatly appreciated.
Thanks, casysso

[QUESTION] Widget resets hover IconButton/InkWell

I have a problem, when i hover over the IconButton or InkWell icon , the widget editor is restarted, but when using GestureDetector the problem does not occur. Is there a way to resolve this?

I'm run the project with --web-renderer=html.

Video showing the problem (Red is GestureDeteector and white is InkWell):

buttonProblem.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.