https://github.com/fleather-editor/parchment_delta
Simple and expressive format for describing rich-text content created for Quill.js editor.
https://github.com/fleather-editor/parchment_delta
Last synced: 4 months ago
JSON representation
Simple and expressive format for describing rich-text content created for Quill.js editor.
- Host: GitHub
- URL: https://github.com/fleather-editor/parchment_delta
- Owner: fleather-editor
- License: other
- Created: 2024-01-14T07:25:18.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-09T20:35:20.000Z (about 1 year ago)
- Last Synced: 2025-07-14T00:45:21.994Z (4 months ago)
- Language: Dart
- Homepage:
- Size: 94.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/fleather-editor/parchment-delta/actions/workflows/build.yml) [](https://codecov.io/gh/fleather-editor/parchment_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: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][tracker].
[tracker]: https://github.com/fleather-editor/parchment-delta/issues