dart_quill_delta 10.8.3 copy "dart_quill_delta: ^10.8.3" to clipboard
dart_quill_delta: ^10.8.3 copied to clipboard

A Dart port of quill-js-delta, offering a simple and expressive JSON format for describing rich-text content and its changes.

example/dart_quill_delta_example.dart

import 'package:dart_quill_delta/dart_quill_delta.dart';

void main() {
  var doc = Delta()..insert('Hello world', {'h': '1'});
  var change = Delta()
    ..retain(6)
    ..delete(5)
    ..insert('Earth');
  var result = doc.compose(change);
  print('Original document:\n$doc\n');
  print('Change:\n$change\n');
  print('Updated document:\n$result\n');

  /// Prints:
  ///
  ///     Original document:
  ///     ins⟨Hello world⟩ + {h: 1}
  ///
  ///     Change:
  ///     ret⟨6⟩
  ///     ins⟨Earth⟩
  ///     del⟨5⟩
  ///
  ///     Updated document:
  ///     ins⟨Hello ⟩ + {h: 1}
  ///     ins⟨Earth⟩
}
3
likes
155
pub points
91%
popularity

Publisher

verified publisherfreshplatform.net

A Dart port of quill-js-delta, offering a simple and expressive JSON format for describing rich-text content and its changes.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

collection, diff_match_patch, quiver

More

Packages that depend on dart_quill_delta