パッケージ、リポジトリ、アプリカテゴリを検索

flutter_summernote のカバー
パッケージ詳細v1.1.1

flutter_summernote

Summernote 0.8.18 JavaScriptラッパーに基づくWYSIWYG HTMLコードを自由に書くのを支援する、AndroidおよびiOS用のFlutterテキストエディタ。

AndroidiOSmacOS
30日間ダウンロード
219
いいね数
107
Pub ポイント
140

パッケージをインストール

flutter pub add flutter_summernote

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

flutter_summernote は、Summernote 0.8.18 JavaScript ライブラリによって駆動される、Android、iOS、macOS 向けの WYSIWYG HTML テキストエディタを提供する Flutter パッケージです。ユーザーは Flutter アプリ内ですべての豊富なテキスト機能を使って、自由にコンテンツを入力・フォーマットできます。HTML 出力をサポートしており、ブログやコンテンツ管理システム、メッセージングプラットフォームなど、形式付きテキスト入力が必要なアプリケーションに最適です。単純な pub add コマンドで Flutter プロジェクトにスムーズに統合可能です。

用途

  • モバイルアプリにおけるコンテンツ作成
  • ブログ投稿エディタ
  • リッチテキストメッセージインターフェース
  • フォーマット付きのフォーム入力
  • HTMLベースのコンテンツ管理

主な機能

  • WYSIWYG HTML 編集
  • Summernote 0.8.18 をサポート
  • クロスプラットフォーム(Android、iOS、macOS)
  • HTML出力の生成
  • pub を通じたシンプルな統合
  • カスタマイズ可能なツールバー

適している対象

  • リッチテキスト入力フォームを構築している開発者
  • HTMLリッチなコンテンツ入力が必要なアプリ
  • モバイルコンテンツエディタ
  • FlutterでSummernote機能を使用するプロジェクト

注意事項

  • レンダリングに WebView が必要です
  • 制限されたネイティブなFlutterウィジェット制御
  • 外部のJavaScriptライブラリに依存しています
  • 低性能デバイスではパフォーマンスのオーバーヘッドが発生する可能性があります
  • HTML出力なしで純粋なネイティブテキスト編集に適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Flutter Summernote

All Contributors

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: ^latest as deppendecy to pubspec.yaml

iOS

Add the following keys to your Info.plist file, located in /ios/Runner/Info.plist:

    <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
Parameter Type Default Description
key GlobalKey required for get method & reset
value String empty initiate text content for text editor
height double 380 height of text editor
decoration BoxDecoration empty Decoration editor
widthImage String 100% width of image picker
hint String empty Placeholder hint text
customToolbar String empty Add all available Toolbar. Don't use insert (video & picture), please use hasAttachment option.
customPopover String empty Add all available Popover (the same paragraph as for toolbar, but below)
hasAttachment Boolean false Use this option if you want to show or hide attachment button
showBottomToolbar Boolean false Use this option if you want to show or hide bottom toolbar
returnContent Function null Use this callback to return text content on await keyEditor.currentState.getText() function call.

License

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

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Chandra Abdul Fattah
Chandra Abdul Fattah

🚇 💻
yusuf afandi
yusuf afandi

💻
Ivan Terekhin
Ivan Terekhin

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

カテゴリー

依存関係

依存関係一覧 5 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。