simple_markdown_editor 0.1.5 copy "simple_markdown_editor: ^0.1.5" to clipboard
simple_markdown_editor: ^0.1.5 copied to clipboard

outdated

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

simple_markdown_editor #

Support Me Support Me GitHub stars undo GitHub GitHub repo size

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:
    simple_markdown_editor: ^version

Recomended Version: >= ^0.1.4+1

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

Result Editor:

screenshoot
33
likes
0
pub points
74%
popularity

Publisher

verified publishermokuton.site

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

expandable, flutter, flutter_markdown, font_awesome_flutter, markdown

More

Packages that depend on simple_markdown_editor