Editor.js insert block at cursor position

I'm creating an Angular application that uses Editor.js for adding some math equations. How can I add block at cursor position from a dialog?

I'm using insert method to insert a block:

this.editor?.blocks.insert('paragraph', { text: result.content }, {}, 
                           this.editor.blocks.getBlocksCount(), true, false);

Upvotes: 0

Views: 29

Answers (0)

Related Questions