HtmlToDelta constructor
HtmlToDelta({
- HtmlOperations? htmlToOperations,
- List<
String> blackNodesList = const [], - List<
CustomHtmlPart> ? customBlocks, - bool trimText = true,
- bool replaceNormalNewLinesToBr = false,
Creates a new instance of HtmlToDelta.
htmlToOperations
defines how common HTML tags are converted to Delta operations.
customBlocks
allows adding custom rules for handling specific HTML tags.
Implementation
HtmlToDelta({
HtmlOperations? htmlToOperations,
this.blackNodesList = const [],
this.customBlocks,
this.trimText = true,
this.replaceNormalNewLinesToBr = false,
}) {
htmlToOp = htmlToOperations ?? DefaultHtmlToOperations();
//this part ensure to set the customBlocks passed at the constructor
htmlToOp.setCustomBlocks(customBlocks ?? []);
}