Search packages, repositories and app categories

markdown_editable_textinput cover
Package detailsv2.2.0

markdown_editable_textinput

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

30-day downloads
454
Likes
191
Pub points
60

Install package

flutter pub add markdown_editable_textinput

Package Overview

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

A Flutter TextField widget designed to seamlessly convert text input into Markdown format. It enables users to type content directly while automatically applying Markdown syntax, making it ideal for lightweight note-taking or content creation with rich text formatting. The package integrates smoothly into forms and editors, offering real-time Markdown rendering without requiring complex setup. Built with simplicity and usability in mind, it supports common Markdown features like bold, italic, headings, and lists through intuitive keyboard shortcuts or manual tagging. Perfect for developers seeking a minimal yet powerful Markdown input solution.

Use cases

  • Simple note-taking apps
  • Markdown-based content creation
  • Form inputs with rich text formatting
  • Lightweight blog editors
  • Real-time Markdown preview

Key features

  • Real-time Markdown conversion
  • Intuitive keyboard shortcuts
  • Supports common Markdown syntax
  • Minimal setup and integration
  • Clean, focused UI design

Suitable for

  • Developers building lightweight editors
  • Apps needing basic Markdown input
  • Educational tools with text formatting
  • Content creators using Markdown
  • Projects prioritizing simplicity over complexity

Considerations

  • Limited to basic Markdown features
  • No built-in preview rendering
  • Not suitable for advanced Markdown parsing
  • Requires manual handling of complex formatting
  • Depends on external Markdown rendering if preview needed

Original README

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

Build Status pub package codecov

markdown_editable_textinput

MarkdownEditableTextInput is a TextField Widget that allow you to convert easily what's in the TextField to Markdown.

Features

  • [x] Convert to Bold, Italic, Strikethrough
  • [x] Convert to Code, Quote, Links
  • [x] Convert to Heading (H1, H2, H3, H4, H5, H6) and Links
  • [x] Support text direction
  • [x] Dialog mode to enter link and picture
  • [x] Possibility to add custom buttons to the action bar

Demo

Link by Dialog demo

Usage

The color of the MarkdownTextInput is defined by the color set in your Theme :

  • primaryColor: Cursor's color
  • colorScheme.secondary: MarkdownTextInput's borders
  • cardColor: Background color of MarkdownTextInput
Attributes
Attributes Example Value Description
Function onTextChanged Callback used to retrieve the text in parent's Widget
String initialValue "Lorem Ipsum" Display an initial value in MarkdownTextInput's field
Function validators Add validators to the MarkdownTextInput
String label "Description" Display a label in MarkdownTextInput
TextDirection textDirection TextDirection.rtl Change text direction
int maxLines 3 The maximum of lines that can be display in the input
List actions [MarkdownType.bold, MarkdownType.italic] Actions the editor will handle
TextEditingController controller TextEditingController() Pass your own controller. Can be used to clear the input for example
TextStyle textStyle Theme.of(context).textTheme.bodyText2 Overrides input text style
bool insertLinksByDialog; true Choose to use dialog or not to insert link
bool insertImageByDialog; true Choose to use dialog or not to insert an image
bool insertImageByDialog; true Choose to use dialog or not to insert an image
bool customCancelDialogText; String? Text used by dialog for close dialog action
bool customSubmitDialogText; String? Text used by dialog for validate dialog action
Example

You can see an example of how to use this package here

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package