Search packages, repositories and app categories

Package detailsv0.2.0

simple_markdown_editor

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

30-day downloads
55
Likes
33
Pub points
60

Install package

flutter pub add simple_markdown_editor

Package Overview

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

A Flutter package that provides a TextField widget designed to simplify the creation of Markdown content. It enables users to type text directly into a field and instantly convert it into formatted Markdown, making it ideal for lightweight note-taking or content input in apps requiring structured text. The package integrates seamlessly with Flutter's UI system and focuses on ease of use without complex configurations.

Use cases

  • Lightweight note-taking apps
  • Simple blog or journal entry forms
  • Markdown-based content creation in mobile apps
  • Real-time Markdown preview integration
  • User-friendly text formatting in forms

Key features

  • Easy-to-use TextField for Markdown input
  • Real-time Markdown conversion
  • Minimal setup and configuration
  • Clean, focused API for basic Markdown needs
  • Seamless integration with Flutter widgets

Suitable for

  • Developers building simple text editors
  • Apps needing quick Markdown support
  • Beginner Flutter developers
  • Projects prioritizing simplicity over advanced features

Considerations

  • Limited to basic Markdown formatting
  • No built-in preview rendering
  • Not suitable for complex document editing
  • No support for rich text styling beyond Markdown
  • Lacks advanced features like syntax highlighting or export options

Original README

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

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

Categories

Dependencies

Dependency list 4 items

Source repository

Projects using this package

No data available yet.