Didiergm
Didiergm

Reputation: 89

Programmatically add blocks

What would be the best way to add (and render) blocks of text on the fly from a js script ?

My users have a fairly complex set of data entry to fill which when they validate an option should generate a block of text which I would then need to insert into an existing EditorJS document. The same process can happen several time before the document is considered complete.

Upvotes: 1

Views: 1119

Answers (1)

Didiergm
Didiergm

Reputation: 89

The blocks.insert() API method will do what I need, not sure why I missed it originally

Upvotes: 1

Related Questions