Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
create plus button for call other nested gutenberg blocks in plain javascript

I'm complete fused for try to make a button in a custom nested blocks.

In short, i should making this:

LINK TO GIF FROM GITHUB - PLUS BUTTON INTO BLOCK

The "button plus" inside a custom block for call other blocks of gutenberg.

Obviously I have read the manual and seen several texts (from which I took the image). however the challenge of doing this in plain js (not jsx) is getting complicated.

currently I have thinked this:

const _ = wp.element.createElement
const useblocks = wp.blockEditor.InnerBlocks
const useprops = wp.blockEditor.useBlockProps

    
var MY_TEMPLATE = [
    [ 'core/columns', {} ],
    [ 'core/heading', { placeholder: 'Test Title' } ],
    ....
];

wp.blocks.registerBlockType( 'the-plugin-scheme/hello-scheme-nested', {

    title: "HELLO SCHEME NESTEDS",
    icon: 'carrot',
    category: 'common',
    attributes: {
        content:{
            type: 'array',
        },
    },

    edit: function( props ) {

        var markup =
             _('div', useprops({className: props.className}),

                _( useblocks ,
                    useprops({ template: MY_TEMPLATE, templateLock:'insert' /*renderAppender: ButtonBlockAppender ??*/} ),
                    _( useblocks.ButtonBlockAppender ),
                )

            );

        return markup;

    },

    save: function( props ) {

       ...

    },

});

I am sensing that the problem is in the ButtonBlockAppender... or similar...

How can i add this button and open the gutenberg blocks windows?

Has anyone dealt with this and can you help me?

Thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!