setHtml method
Set html content for editor
Implementation
void setHtml(String html) async {
if (html != '<p></p>' && html != '<p><br></p>') {
await webViewController.evaluateJavascript(source: 'hidePlaceholder();');
}
if (html == '<p></p>') {
html = '<p><br></p>';
}
await webViewController.evaluateJavascript(
source: 'editor.innerHTML = `$html`;');
double contentHeight = double.parse((await webViewController
.evaluateJavascript(source: 'editor.scrollHeight;'))
.toString());
setHeight?.call(contentHeight);
}