diff --git a/lib/src/editor_api.dart b/lib/src/editor_api.dart index d08b4c1..2a9d160 100644 --- a/lib/src/editor_api.dart +++ b/lib/src/editor_api.dart @@ -368,7 +368,7 @@ class HtmlEditorApi { /// Sets the given text, replacing the previous text completely Future setText(String text) { final html = _htmlEditorState.generateHtmlDocument(text); - return _webViewController.evaluateJavascript(source: html); + return _webViewController.loadData(data: html); } /// Selects the HTML DOM node at the current position fully.