Rich text editor for Flutter
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.
 
 
 
 
 

19 lines
527 B

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());
});
});
}