v2.0.0
quill_delta
一種用於描述豐富文字內容的簡單且具表現力的格式,專為 Quill.js 編輯器所設計。此套件是 JavaScript 版本的非官方 Dart 移植。
34喜歡 4760近 30 天下載40Pub 分數
平台暫無資料
Dart 中 Quill 編輯器 Delta 格式實作。
^1.15.0^3.0.0^0.4.1^1.0.0^1.11.0^1.17.5以下為英文專案原文快照,最新內容請造訪 GitHub。
Implementation of Quill editor Delta format in Dart. Refer to official documentation for more details.
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⟩
}
Please file feature requests and bugs at the issue tracker.