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.

Rockiger 1 year 2021-08-28T15:57:58-05:00 0 Answers 0 views 0

Leave an answer