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

Bidirectional Quill Delta to Markdown conversion. Pure Dart companion package to flutter_quill_kit; also usable standalone or server-side.

example/main.dart

// ignore_for_file: avoid_print
import 'package:flutter_quill_kit_markdown/flutter_quill_kit_markdown.dart';

/// Round-trips a small document between Markdown and Quill Delta, printing
/// both forms. Pure Dart — run it with `dart run example/main.dart`.
void main() {
  const source = '''
# flutter_quill_kit_markdown

Some **bold**, *italic*, ~~struck~~ and `inline code` text with a
[link](https://pub.dev/packages/flutter_quill_kit).

- A bullet
- Another bullet
  - Nested (becomes the Quill `indent` attribute)

- [x] A done task
- [ ] An open task

```dart
print('fenced code keeps its language');
```
''';

  // Markdown -> Delta: always a valid, insert-only, '\n'-terminated delta.
  final delta = markdownToDelta(source);
  print('=== Delta ops ===');
  for (final op in delta.toJson()) {
    print(op);
  }

  // Delta -> Markdown: attributes Markdown cannot express are dropped and
  // reported through onUnsupported.
  final markdown = deltaToMarkdown(
    delta,
    onUnsupported: (key, value) => print('dropped: $key=$value'),
  );
  print('=== Markdown ===');
  print(markdown);
}
0
likes
160
points
112
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Bidirectional Quill Delta to Markdown conversion. Pure Dart companion package to flutter_quill_kit; also usable standalone or server-side.

Repository (GitHub)
View/report issues
Contributing

Topics

#markdown #quill #delta #rich-text

License

MIT (license)

Dependencies

dart_quill_delta, markdown

More

Packages that depend on flutter_quill_kit_markdown