TypeCellOS/BlockNote

Return the data (or id atleast) of the new block created upon using `insertBlocks`

zeus-12 opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
i have this use-case where i have the base64 of an image, and wanna insert it (say on click of a button).
But uploading to s3, then adding to the note doesn't seem ideal, cause of the delay(poor ux).

So i was thinking of creating a custom component, which inserts the base64 at first, then updates the url of the image once the file upload is done.

Describe the solution you'd like
Return either just the id or the whole data of the new block created on using insertBlocks.

Describe alternatives you've considered
Uploading to storage, then adding to the editor seems to be the best alternative option, but like i said thats bad ux.

Additional context
None