flutter_html_editor 1.0.0

Flutter Android iOS

Flutter HTML Editor is a text editor for android and iOS to help write WYSIWYG HTML code based on the Summernote javascript wrapper

Flutter Html Editor #

Flutter HTML Editor is a text editor for android and iOS to help write WYSIWYG HTML code based on the Summernote javascript wrapper. with this library you can insert images into the text editor

demo example demo android demo ios

Setup #

add flutter_html_editor: ^1.0.1 as deppendecy to pubspec.yaml

iOS #

Add the following keys to your Info.plist file, located in

    <key>io.flutter.embedded_views_preview</key>
    <true/>

    <key>NSCameraUsageDescription</key>
    <string>Used to demonstrate image picker plugin</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>Used to capture audio for image picker plugin</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>Used to demonstrate image picker plugin</string>

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
         <true/>
    </dict>

Usage #

  1. import flutter html editor
    import 'package:flutter_html_editor/flutter_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 #

ParameterTypeDefaultDescription
keyGlobalKeyrequiredfor get method & reset
valueStringemptyiniate text content for text editor
heightdouble380height of text editor
decorationBoxDecorationDecoration editor
useBottomSheetbooltrueif true Pickup image user bottomsheet or dialog if else
widthImageString100%width of image picker
showBottomToolbarbooltrueshow hide bottom toolbar
hintStringemptyPlaceholder hint text

License #

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

#MajalengkaExoticSundaland

1
likes
70
pub points
67%
popularity

Flutter HTML Editor is a text editor for android and iOS to help write WYSIWYG HTML code based on the Summernote javascript wrapper

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

tronghuu271095@gmail.com

License

MIT (LICENSE)

Dependencies

flutter, image_picker, mime, path, webview_flutter

More

Packages that depend on flutter_html_editor