insertText method

Future insertText(
  1. String text, {
  2. int? index,
})

insertText method is used to insert the html text to the editor if the index is not passed, it will insert the text at cursor position

Implementation

Future insertText(String text, {int? index}) async {
  return await _editorKey?.currentState
      ?._insertHtmlTextToEditor(htmlText: text, index: index);
}