convert method
Convert the Delta ops provided at construction to an HTML string.
Implementation
String convert() {
final List<TDataGroup> groups = getGroupedOps();
return groups.map((TDataGroup group) {
if (group is ListGroup) {
return _renderWithCallbacks(GroupType.list, group, () => _renderList(group));
}
if (group is TableGroup) {
return _renderWithCallbacks(GroupType.table, group, () => _renderTable(group));
}
if (group is BlockGroup) {
return _renderWithCallbacks(GroupType.block, group, () => renderBlock(group.op, group.ops));
}
if (group is BlotBlock) {
return _renderCustom(group.op, null);
}
if (group is VideoItem) {
return _renderWithCallbacks(GroupType.video, group, () {
OpToHtmlConverter converter = OpToHtmlConverter(group.op, _converterOptions);
return converter.getHtml();
});
}
// InlineGroup
return _renderWithCallbacks(GroupType.inlineGroup, group, () => renderInlines((group as InlineGroup).ops, true));
}).join('');
}