docsy_html 0.1.0 copy "docsy_html: ^0.1.0" to clipboard
docsy_html: ^0.1.0 copied to clipboard

HTML import/export adapter for Docsy.

Docsy HTML #

The Docsy HTML package provides export functionality for the Docsy editor.
It allows you to serialize Docsy documents into HTML for rendering in browsers or embedding into websites.

✨ Features #

  • Export any Docsy Document into valid HTML5.
  • Supports paragraphs, headings, quotes, dividers, code blocks, inline marks (bold, italic, underline, code, links).
  • Lightweight, dependency-free output.

🚀 Installation #

Add this to your pubspec.yaml:

dependencies:
  docsy_html: ^0.0.1

📖 Usage #

import 'package:docsy/docsy.dart';
import 'package:docsy_html/docsy_html.dart';

void main() {
  final doc = Document([
    ParagraphNode(inlines: [
      TextSpanNode("Hello ", marks: TextMarks()),
      TextSpanNode("world", marks: TextMarks(bold: true)),
    ]),
  ]);

  final html = DocsyHtmlCodec().encode(doc);
  print(html); // <p>Hello <strong>world</strong></p>
}

📷 Example #

<p>Hello <strong>world</strong></p>

📜 License #

MIT License. See LICENSE.

2
likes
130
points
29
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

HTML import/export adapter for Docsy.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

docsy, flutter, html

More

Packages that depend on docsy_html