I’d love to build on this. And perhaps study a core-element block such as the WP-core Heading block, and see how they had constructed a toolbar that configures the h-‘size’ tag / element being used. It appears the blocks have been relocated (possibly into a NPM package?) . Can somebody tell me how I can access the index.js of the header block of the core library?
Has anybody been able to import an existing block-library component into a custom block being developed?
What I’m trying to do is import existing structure of the Heading block inside a larger “container / rich text block”. I could start building custom block – field buttons, but I see this getting hairy quick.
It’s possible I’m searching the web but not using the right vernacular.
My understanding is core blocks are not meant to be imported into custom blocks.
But you can look at how that core block was built and rebuild it in your block.
If you want to group together blocks, you might want to use reusable blocks or block templates or even nested blocks. The nested blocks approach might work.