dartlangeditorflutterflutter-appsflutter-examplesflutter-packageflutter-widgetquillquill-deltaquilljsreactquillrich-textrich-text-editorwysiwygwysiwyg-editor
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
527 B
20 lines
527 B
1 year ago
|
import 'package:dart_quill_delta/dart_quill_delta.dart';
|
||
|
import 'package:quill_html_converter/quill_html_converter.dart';
|
||
|
import 'package:test/test.dart';
|
||
|
|
||
|
void main() {
|
||
|
group('Quill HTML Converter', () {
|
||
|
test('Example of toHtml', () {
|
||
|
const html = '<p><br/></p><h1><br/></h1>';
|
||
|
final quillDelta = [
|
||
|
{'insert': '\n'},
|
||
|
{
|
||
|
'attributes': {'header': 1},
|
||
|
'insert': 'Hello'
|
||
|
}
|
||
|
];
|
||
|
expect(Delta.fromJson(quillDelta).toHtml().trim(), html.trim());
|
||
|
});
|
||
|
});
|
||
|
}
|