plugin development – How to insert text at the current cursor position in Gutenberg?

I am trying to insert text into Gutenberg at the current position for a speech to text solution.

I am aware how to insert new blocks.

const newBlock = wp.blocks.createBlock( "core/paragraph", {
    content: 'This is the content',
}); "core/editor" ).insertBlocks( newBlock );

But I can’t figure out how to add a string at the current cursor position. Could somebody please give me a hint. Any help appreciated.