Search packages, repositories and app categories

Package detailsv0.2.15

markdown_editor_plus

A TextField Widget that allow you to convert easily what's in the TextField to Markdown with custom toolbar support.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
8.3K
Likes
73
Pub points
140

Install package

flutter pub add markdown_editor_plus

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter widget that enhances text input with real-time Markdown formatting capabilities. It wraps a TextField to support Markdown syntax conversion and includes a customizable toolbar for easy formatting. Ideal for applications requiring rich text editing with Markdown output, such as note-taking apps or content management systems. The package supports multiple platforms including mobile, web, and desktop, ensuring consistent behavior across devices.

Use cases

  • Note-taking apps
  • Content creation tools
  • Documentation editors
  • Blog writing interfaces
  • Markdown-based chat applications

Key features

  • Real-time Markdown conversion
  • Customizable toolbar
  • Cross-platform compatibility
  • Simple integration with TextField
  • Supports all major platforms

Suitable for

  • Developers building Markdown-enabled forms
  • Apps needing lightweight rich text editing
  • Projects requiring platform-agnostic text input
  • Users wanting intuitive Markdown formatting

Considerations

  • Limited advanced formatting options
  • No built-in preview mode
  • Requires manual handling of complex Markdown structures
  • Not optimized for large documents
  • Toolbar customization requires basic Flutter knowledge

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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

Categories

Dependencies

Dependency list 4 items

Source repository

Projects using this package

No data available yet.