insertText method
Inserts plain text at the current cursor position.
Implementation
void insertText(String text) {
final blockIndex = _editorWidgetState?.focusedBlockIndex ?? 0;
final offset = _editorWidgetState?.cursorOffset ?? 0;
final info = focusedTableInfo;
if (info != null) {
_documentController.insertCellText(
info.blockIndex, info.row, info.col, offset, text);
} else {
_documentController.insertText(blockIndex, offset, text);
}
_editorWidgetState?.rebuild();
}