programattically add new block
-
Hi,
i am working on a custom block that allows innerblocks, one of these inner blocks is also a custom block with content in it. What i am trying to achiev is that the user should be able to mark/click/drag part of that content into a new inner block that is then added under the existing ones.
so what i am looking for is for example a function to create a new block (p,richtext, image or even a customblock) and add said content into it (the content adding could be done via react state i guess). Is there something like that or is there a hook, an API route or anything that i can use to create a new innerblock?I am not entirely sure if this support forum is the right place for such questions. If not could you please point me to the right direction?
Thank you in advance,
regards Eli
- The topic ‘programattically add new block’ is closed to new replies.