html_editor 0.0.2 copy "html_editor: ^0.0.2" to clipboard
html_editor: ^0.0.2 copied to clipboard

outdated

Flutter HTML Editor

Flutter Html Editor #

Flutter HTML Editor is a text editor to help write WYSIWYG HTML code based on wrapper Summernote javascript

demo example demo example

Setup #

add html_editor as deppendecy to pubspec.yaml

iOS #

Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value YES.

Usage #

  1. import flutter html editor
    import 'package:html_editor/html_editor.dart';
  1. Create Global key from HTML Editor State
    GlobalKey<HtmlEditorState> keyEditor = GlobalKey();
  1. Add HTML Editor to widget
    HtmlEditor(
        hint: "Your text here...",
        //value: "text content initial, if any",
        key: keyEditor,
        height: 400,
    ),
  1. Get text from Html Editor
    final txt = await keyEditor.currentState.getText();

Avalaible option parameters #

Parameter Type Default Description
key GlobalKey required for get method & reset
value String empty iniate text content for text editor
height double 380 height of text editor
decoration BoxDecoration Decoration editor
useBottomSheet bool true if true Pickup image user bottomsheet or dialog if else
widthImage String 100% width of image picker
showBottomToolbar bool true show hide bottom toolbar
hint String empty Placeholder hint text

License #

This project is licensed under the MIT License - see the LICENSE.md file for details