insertText method
Insert text at the given index of the given Node or the Path.
Path and Node are mutually exclusive. One of these two parameters must have a value.
Implementation
Future<void> insertText(
int index,
String text, {
Path? path,
Node? node,
}) async {
node ??= getNodeAtPath(path!);
if (node == null) {
assert(false, 'node is null');
return;
}
return apply(
transaction..insertText(node, index, text),
);
}