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

パッケージ詳細v0.2.15

markdown_editor_plus

TextField の内容を簡単に Markdown に変換できる TextField ウィジェットで、カスタムツールバーのサポートも提供します。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
8270
いいね数
73
Pub ポイント
140

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

flutter pub add markdown_editor_plus

パッケージ概要

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

リアルタイムでMarkdown形式の書式設定を可能にするFlutterウィジェットです。TextFieldをラップしてMarkdown構文の変換をサポートし、カスタマイズ可能なツールバーを備え、簡単にフォーマットできます。ノート作成アプリやコンテンツ管理システムなど、Markdown出力が必要なアプリに最適です。モバイル、Web、デスクトップを含む複数のプラットフォームをサポートしており、デバイス間で一貫した動作を保証します。

用途

  • ノートアプリ
  • コンテンツ作成ツール
  • ドキュメントエディタ
  • ブログ執筆インターフェース
  • Markdownベースのチャットアプリケーション

主な機能

  • リアルタイムでのMarkdown変換
  • カスタマイズ可能なツールバー
  • クロスプラットフォーム互換性
  • TextField との簡単な統合
  • すべての主要プラットフォームをサポートしています

適している対象

  • Markdown対応フォームを構築する開発者
  • 軽量なリッチテキスト編集を必要とするアプリ
  • プラットフォームに依存しないテキスト入力が必要なプロジェクト
  • 直感的な Markdown 書式設定を希望するユーザー

注意事項

  • 限定された高度な書式設定オプション
  • 組み込みのプレビュー モードなし
  • 複雑な Markdown 構造を手動で処理する必要があります
  • 大規模なドキュメントには最適化されていません
  • ツールバーのカスタマイズには基本的なFlutterの知識が必要です

元の README

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

Markdown Editor Plus

This is a fork of simple_markdown_editor by zahnia88 with contributions from fossfreaks

Simple markdown editor library For flutter. For demo video, you can see it at this url Demo

Features

  • ✅ Convert to Bold, Italic, Strikethrough
  • ✅ Convert to Code, Quote, Links
  • ✅ Convert to Heading (H1, H2, H3).
  • ✅ Convert to unorder list and checkbox list
  • ✅ Support multiline convert
  • ✅ Support auto convert emoji

Usage

Add dependencies to your pubspec.yaml

dependencies:
    markdown_editor_plus: ^latest

Run flutter pub get to install.

How it works

Import library

import 'package:markdown_editor_plus/markdown_editor_plus.dart';

Initialize controller and focus node. These controllers and focus nodes are optional because if you don't create them, the editor will create them themselves

TextEditingController _controller = TextEditingController();

Show widget for editor

// editable text with toolbar by default
MarkdownAutoPreview(
    controller: _controller,
    emojiConvert: true,
)

// editable text without toolbar
MarkdownField(
    controller: _controller,
    emojiConvert: true,
    enableToolBar: false,
)

if you want to parse text into markdown you can use the following widget:

String data = '''
**bold**
*italic*

#hashtag
@mention
'''

MarkdownParse(
    data: data,
    onTapHastag: (String name, String match) {
        // name => hashtag
        // match => #hashtag
    },
    onTapMention: (String name, String match) {
        // name => mention
        // match => #mention
    },
)

In order to set the colors

MarkdownAutoPreview(
    controller: _controller,
    enableToolBar: true,
    emojiConvert: true,
    autoCloseAfterSelectEmoji: false,
    // toolbar's background color, text color will be based on theme
    toolbarBackground: Colors.blue,
    // toolbar's expandable widget colors like headings, ordering
    expandableBackground: Colors.blue[200],
)

カテゴリー

依存関係

依存関係一覧 4 件

ソースリポジトリ

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

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