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

A quill to markdown converter and vice versa

example/main.dart

import 'package:flutter/material.dart';
import 'package:quill_markdown/quill_markdown.dart';

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Center(
      child: FlatButton(
          onPressed: () {
            String content =
                '[{"insert":"Heading"},{"insert":"\\n","attributes":{"header":1}},{"insert":"bold","attributes":{"bold":true}},{"insert":"\\n"},{"insert":"bold and italic","attributes":{"bold":true,"italic":true}},{"insert":"\\nsome code"},{"insert":"\\n","attributes":{"code-block":true}},{"insert":"A quote"},{"insert":"\\n","attributes":{"blockquote":true}},{"insert":"ordered list"},{"insert":"\\n","attributes":{"list":"ordered"}},{"insert":"unordered list"},{"insert":"\\n","attributes":{"list":"bullet"}},{"insert":"link","attributes":{"link":"pub.dev/packages/quill_markdown"}},{"insert":"\\n"}]';
            content = quillToMarkdown(content)!;
            print(content);
            content = markdownToQuill(content)!;
            print(content);
          },
          child: Text('Convert')),
    ));
  }
}
16
likes
80
points
2.14k
downloads

Publisher

verified publisherarjanaswal.com

Weekly Downloads

A quill to markdown converter and vice versa

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

collection, flutter, meta

More

Packages that depend on quill_markdown