quill_delta_dart 1.0.2 icon indicating copy to clipboard operation
quill_delta_dart: ^1.0.2 copied to clipboard

Simple and expressive format for describing rich-text content created for Quill.js editor. This package is unofficial port to Dart from JavaScript.

Build Status codecov Pub

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

Usage #

import 'package:quill_delta/quill_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.

0
likes
110
pub points
0%
popularity

Publisher

unverified uploader

Simple and expressive format for describing rich-text content created for Quill.js editor. This package is unofficial port to Dart from JavaScript.

Homepage

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

collection, quiver_hashcode

More

Packages that depend on quill_delta_dart