xrb21 / flutter-html-editor

MIT License
82 stars 64 forks source link

using TextEditingController in flutter_html_editor? #16

Open hason1 opened 4 years ago

hason1 commented 4 years ago

is there any way to use summernote or wysiwyg editor in Flutter textfield editor?

I used flutter_html_editor, Zefyr, html_editor and flutter_summernote packages, but these dont worked well and they returned null value in the following code:

    final _etEditor = await keyEditor.currentState.getText();

I got the following error:

E/flutter ( 6639): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: NoSuchMethodError: The method 'getText' was called on null.
E/flutter ( 6639): Receiver: null
E/flutter ( 6639): Tried calling: getText()

I want that the textfield become like the attached image. How to fix it? Can you add a controller to save the text into it?

Can I implement a package like these, or is there any solution to make summernote or wysiwyg textfield editor which can convert html tags in Flutter?

enter image description here

thanks