docsy_markdown 0.1.2
docsy_markdown: ^0.1.2 copied to clipboard
Markdown import and export support for Docsy, the modular Flutter WYSIWYG editor. Convert documents seamlessly between Docsy and Markdown.
Docsy Markdown #
The Docsy Markdown package provides import and export functionality for the Docsy editor.
It allows you to serialize Docsy documents into Markdown and restore them back into Docsy.
✨ Features #
- Import and export any Docsy
Documentto Markdown. - Supports paragraphs, headings, quotes, lists, dividers, inline formatting (bold, italic, underline, code, links).
- Clean and Git-friendly output.
🚀 Installation #
Add this to your pubspec.yaml:
dependencies:
docsy_markdown: ^0.1.1
📖 Usage #
import 'package:docsy/docsy.dart';
import 'package:docsy_markdown/docsy_markdown.dart';
void main() {
final doc = Document([
ParagraphNode(inlines: [
TextSpanNode("Hello ", marks: TextMarks()),
TextSpanNode("world", marks: TextMarks(bold: true)),
]),
]);
final md = DocsyMarkdownCodec().encode(doc);
print(md); // Hello **world**
}
📷 Example #
Hello **world**
📜 License #
MIT License. See LICENSE.