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

rich_editor のカバー
パッケージ詳細v0.5.0

rich_editor

豊富なフォーマットオプションをサポートする Flutter 向けの WYSIWYG エディタ。

AndroidiOSmacOSWindows
30日間ダウンロード
1030
いいね数
93
Pub ポイント
150

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

flutter pub add rich_editor

パッケージ概要

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

Flutter向けのWYSIWYGエディタで、太字、イタリック、リスト、リンクなど、豊富なテキスト形式をサポートしています。高度なテキスト入力が必要なアプリへのシームレスな統合を目的としており、フォーマットされたコンテンツを作成するためのクリーンで直感的なインターフェースを提供します。拡張性を重視して構築されており、カスタムスタイルやプラグインもサポートしています。このパッケージは継続的にメンテナンスされており、Android、iOS、macOS、Windows プラットフォームすべてと互換性があります。

用途

  • ノートアプリでリッチテキストコンテンツを作成する
  • ブログまたは記事エディタの構築
  • ユーザー生成コンテンツフォームの実装
  • 共同文書ツールの開発
  • フォーマットされたメッセージインターフェースの有効化

主な機能

  • リアルタイムWYSIWYG編集
  • 豊富な書式設定オプション(太字、イタリック、下線など)
  • リンク、画像、リストのサポート
  • カスタマイズ可能なツールバーとテーマ
  • クロスプラットフォーム互換性

適している対象

  • コンテンツ豊富なFlutterアプリケーションを開発する開発者
  • ユーザーに優しいテキスト編集を必要とするアプリ
  • MarkdownまたはHTML出力が必要なプロジェクト
  • マルチプラットフォームテキストエディタの開発に取り組むチーム

注意事項

  • 複雑なスタイリングには追加の設定が必要になる場合があります
  • 大規模なドキュメントではパフォーマンスが異なる場合があります
  • 限定された組み込み画像アップロード処理
  • Flutter のレンダリングモデルの理解が必要です

元の README

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

✨ rich_editor

pub package pub points

WYSIWYG editor for Flutter with a rich set of supported formatting options.

Based on https://github.com/dankito/RichTextEditor, but for Flutter.

✨ Features

  • [x] Bold, Italic, Underline, Strike through, Subscript, Superscript
  • [x] Heading 1 - 6, Text body, Preformatted, Block quote
  • [x] Font (reads all system fonts) (Android only)
  • [x] Font Size
  • [x] Text Color
  • [x] Text Background Color
  • [x] Highlight text
  • [x] Justify Left, Center, Right, Blockquote
  • [x] Indent, Outdent
  • [x] Undo, Redo
  • [x] Unordered List (Bullets)
  • [x] Ordered List (Numbers)
  • [x] Insert local or remote Image
  • [x] Insert Link
  • [x] Insert Checkbox
  • [ ] Search
  • [ ] Icon indicators

📸 Screenshots

Usage

      // Insert widget into tree
      RichEditor(
        key: keyEditor,
        value: 'initial html here',
        editorOptions: RichEditorOptions(
          placeholder: 'Start typing',
          // backgroundColor: Colors.blueGrey, // Editor's bg color
          // baseTextColor: Colors.white,
          // editor padding
          padding: EdgeInsets.symmetric(horizontal: 5.0),
          // font name
          baseFontFamily: 'sans-serif',
          // Position of the editing bar (BarPosition.TOP or BarPosition.BOTTOM)
          barPosition: BarPosition.TOP,
        ),
        // You can return a Link (maybe you need to upload the image to your
        // storage before displaying in the editor or you can also use base64
        getImageUrl: (image) {
          String link = 'https://avatars.githubusercontent.com/u/24323581?v=4';
          String base64 = base64Encode(image.readAsBytesSync());
          String base64String = 'data:image/png;base64, $base64';
          return base64String;
        },
      )

Get current HTML from editor

String? html = await keyEditor.currentState?.getHtml();
print(html);

Set Focus and Unfocus

await keyEditor.currentState?.focus();
await keyEditor.currentState?.unFocus();

Clear Editor content

await keyEditor.currentState?.clear();
Custom Toolbar

If you're interested in creating your own toolbar check the custom_toolbar_demo.dart in the example

License

Copyright 2021 JideGuru

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

カテゴリー

依存関係

依存関係一覧 4 件

ソースリポジトリ

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