flutter_summernote 0.2.0
flutter_summernote: ^0.2.0

Flutter Android iOS

Text Editor in Flutter for Android and iOS to help free write WYSIWYG HTML code based on Summernote 0.8.18 javascript wrapper.

Flutter Summernote #

Text Editor in Flutter for Android and iOS to help free write WYSIWYG HTML code based on Summernote 0.8.18 javascript wrapper.

demo example demo example

NOTICE #

This package dependent to the Official WebView Plugin. In this package can't add image, video, or another file using editor toolbar. To handle attach image this package give you another solution using image Image Picker at bottom of editor. This package can't use enableinteractiveSelection from TextField, to handle that this package give you another solution using copy paste at bottom of editor. Thank you for all your support.

Setup #

add flutter_summernote: ^0.1.0 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_summernote/flutter_summernote.dart';
  1. Create Global key from HTML Editor State
    GlobalKey<FlutterSummernoteState> _keyEditor = GlobalKey();
  1. Add HTML Editor to widget
    FlutterSummernote(
        hint: "Your text here...",
        key: _keyEditor
    ),
    FlutterSummernote(
        hint: "Your text here...",
        key: _keyEditor,
        customToolbar: """
            [
                ['style', ['bold', 'italic', 'underline', 'clear']],
                ['font', ['strikethrough', 'superscript', 'subscript']]
            ]"""
    )
  1. Get text from Html Editor
    final _etEditor = await keyEditor.currentState.getText();

Avalaible option parameters #

ParameterTypeDefaultDescription
keyGlobalKeyrequiredfor get method & reset
valueStringemptyiniate text content for text editor
heightdouble380height of text editor
decorationBoxDecorationDecoration editor
widthImageString100%width of image picker
hintStringemptyPlaceholder hint text
customToolbarStringemptyAdd all available Toolbar

License #

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

16
likes
70
pub points
83%
popularity

Text Editor in Flutter for Android and iOS to help free write WYSIWYG HTML code based on Summernote 0.8.18 javascript wrapper.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

chandrashibezzo@gmail.com

License

unknown (LICENSE)

Dependencies

flutter, image_picker, mime, path, webview_flutter

More

Packages that depend on flutter_summernote