insertText method

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

Inserts HTML text into the editor.

The insertText method is used to insert HTML text into the editor. If the index parameter is not specified, the text will be inserted at the current cursor position.

Implementation

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