parchment_delta 1.0.0 copy "parchment_delta: ^1.0.0" to clipboard
parchment_delta: ^1.0.0 copied to clipboard

Simple and expressive format for describing rich-text content created for Quill.js editor.

build codecov

Implementation of Quill editor Delta format in Dart. Refer to official documentation for more details.

Usage #

import 'package:parchment_delta/parchment_delta.dart';

void main() {
  var doc = new Delta()..insert('Hello world', {'h': '1'});
  var change = new 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⟩
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

4
likes
140
pub points
81%
popularity

Publisher

unverified uploader

Simple and expressive format for describing rich-text content created for Quill.js editor.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT, BSD-3-Clause (license)

Dependencies

collection, diff_match_patch, quiver

More

Packages that depend on parchment_delta