delta_to_html 0.2.2 copy "delta_to_html: ^0.2.2" to clipboard
delta_to_html: ^0.2.2 copied to clipboard

This lightweight package helps you convert Delta to HTML. HTML Most tags are supported in this package.

example/example.dart

import 'package:delta_to_html/delta_to_html.dart';

void main() async {
  /* Using Flutter_Quill Delta Controller
  
  List delta = deltaController.document.toDelta().toJson();
  print(DeltaToHTML.encodeJson(delta);

  */

  List delta = [
    {
      "insert": "Welcome",
      "attributes": {"bold": true, "italic": true, "underline": true}
    },
    {
      "insert": " ",
      "attributes": {"italic": true, "underline": true}
    },
    {
      "insert": "to delta to html package",
      "attributes": {"bold": true, "italic": true, "underline": true}
    },
    {"insert": "\n"}
  ];
  // ignore: avoid_print
  print(DeltaToHTML.encodeJson(delta));
}
17
likes
140
pub points
89%
popularity

Publisher

verified publishermailbyproton.tech

This lightweight package helps you convert Delta to HTML. HTML Most tags are supported in this package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on delta_to_html