flutter-html-editor icon indicating copy to clipboard operation
flutter-html-editor copied to clipboard

Add insert config

Open afandiyusuf opened this issue 4 years ago • 0 comments

@xrb21 Hello, Great plugin :).

In this pull request, I added insertConfig parameter to HtmlEditor(), so we can disable/enable the insert toolbar. For the value of that parameter, we can check the official documentation from summernote since I just parsing the list string and inject it into the initialization summer note javascript.

example: we can use ['link','picture','vide','table']

I make the bottom toolbar hide/show too depends on how these parameters are set. example: if we use insertConfig: ['link'] the image bottom toolbar would be hidden since we didn't use 'image' for insertConfig.

NB: I change id "summernote" to "summernote-2" for preventing auto initialization, so we can make our own initialization with custom config.

This is how to use HtmlEditor after we merge this pull request

HtmlEditor(
      hint: "Your text here...",
      //value: "text content initial, if any",
      key: keyEditor,
      height: 400,
      insertConfig: ['link','video'],
)

Related Issue #4 #8 Thanks.

afandiyusuf avatar Dec 01 '20 09:12 afandiyusuf