https://github.com/pulyaevskiy/quill-delta-dart
Implementation of Quill editor Delta format in Dart.
https://github.com/pulyaevskiy/quill-delta-dart
dartlang flutter operational-transformation quill-delta
Last synced: 2 months ago
JSON representation
Implementation of Quill editor Delta format in Dart.
- Host: GitHub
- URL: https://github.com/pulyaevskiy/quill-delta-dart
- Owner: pulyaevskiy
- License: bsd-3-clause
- Created: 2018-02-22T19:13:20.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-09T03:20:45.000Z (over 2 years ago)
- Last Synced: 2025-02-27T11:49:21.857Z (3 months ago)
- Topics: dartlang, flutter, operational-transformation, quill-delta
- Language: Dart
- Homepage: https://github.com/pulyaevskiy/quill-delta-dart
- Size: 60.5 KB
- Stars: 65
- Watchers: 4
- Forks: 29
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.travis-ci.com/pulyaevskiy/quill-delta-dart) [](https://codecov.io/gh/pulyaevskiy/quill-delta-dart) [](https://pub.dev/packages/quill_delta)
Implementation of Quill editor Delta format in Dart. Refer to official
[documentation][] for more details.[documentation]: https://quilljs.com/docs/delta/
## Usage
```dart
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][tracker].
[tracker]: https://github.com/pulyaevskiy/quill-delta-dart/issues