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

パッケージ詳細v0.2.0

simple_markdown_editor

TextField の内容を簡単に Markdown に変換できる TextField ウィジェットです。

30日間ダウンロード
55
いいね数
33
Pub ポイント
60

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

flutter pub add simple_markdown_editor

パッケージ概要

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

Markdown コンテンツの作成を簡素化するための、TextField ウィジェットを提供する Flutter パッケージです。ユーザーはフィールドに直接テキストを入力し、即座にフォーマットされた Markdown に変換できます。軽量なノート作成や構造化テキストが必要なアプリケーションにおけるコンテンツ入力に最適です。このパッケージは Flutter の UI システムとシームレスに統合され、複雑な設定なしに使いやすさを重視しています。

用途

  • 軽量なメモアプリ
  • シンプルなブログまたは日記エントリーフォーム
  • モバイルアプリにおけるMarkdownベースのコンテンツ作成
  • リアルタイムMarkdownプレビュー統合
  • フォーム内のユーザーに優しいテキスト形式

主な機能

  • Markdown 入力用に使いやすい TextField
  • リアルタイムでのMarkdown変換
  • 最小限のセットアップと構成
  • 基本的な Markdown 機能に特化した明確な API
  • Flutter ウィジェットとのシームレスな統合

適している対象

  • シンプルなテキストエディタを構築している開発者
  • 迅速な Markdown サポートが必要なアプリ
  • 初心者のFlutter開発者
  • 高度な機能よりもシンプルさを重視するプロジェクト

注意事項

  • 基本的なMarkdownフォーマットに制限されています
  • 組み込みのプレビュー描画なし
  • 複雑なドキュメント編集には適していません
  • Markdown 以外の豊富なテキストスタイルのサポートなし
  • 構文の強調やエクスポートオプションなどの高度な機能が欠けている

元の README

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

simple_markdown_editor

Support Me Support Me GitHub stars undo GitHub

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

What's new (21/01/2022)

  • Auto preview if editor unfocused, request from issue #4

Features

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

Usage

Add dependencies to your pubspec.yaml

dependencies:
    simple_markdown_editor: ^latest

Run flutter pub get to install.

How it works

Import library

import 'package:simple_markdown_editor/simple_markdown_editor.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();
FocusNode _focusNode = FocusNode();

Show widget for editor

// editable text with toolbar
MarkdownFormField(
    controller: _controller,
    enableToolBar: true,
    emojiConvert: true,
    autoCloseAfterSelectEmoji: false,
)

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

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
    },
)

カテゴリー

依存関係

依存関係一覧 4 件

ソースリポジトリ

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

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