Attempting to specify viewScript, in a custom block, results in a register_block_script_handle error
Attempting to specify viewScript, in a custom block, results in a register_block_script_handle error
Attempting to specify viewScript, in a custom block, results in a register_block_script_handle error
Gutenberg block not displaying prop values
Different blocks work differently. Some blocks are just a comment, while some require HTML. Others depend on inner blocks for their actual content. The Social Links block is a wrapper block and each social link is a variation of the Social Link block. But no matter how the block actually works, the easiest way to … Read more
I found it – it is dynamically injected as entity in gutenberg/packages/core-data/src/index.js, on line 22 const entitySelectors = rootEntitiesConfig.reduce( ( result, entity ) => { const { kind, name } = entity; result[ getMethodName( kind, name ) ] = ( state, key, query ) => selectors.getEntityRecord( state, kind, name, key, query ); result[ getMethodName( kind, … Read more
Unfortunately, there is no easy solution. You could use editor.BlockEdit hook to change default core/image Edit component, and copy the code from current trunk version, and change there to not use MediaPlaceholder, but MediaUpload wrapped in MediaUploadCheck. However, that would create problem that all core/image blocks would be changed and it would not be futureproof, … Read more
Rather than passing handleChange directly to onChange, you can use an anonymous function to call it: <CheckboxControl key={index} checked={isChecked} label={element.title} help={element.description} name={element.name} onChange={(value) => { handleChange(element.name, value); }} /> Then your handleChange function can accept the name and value as its parameters. const handleChange = (name, value) => { setInputs(values => ({…values, [name]: value})); };
How to restrict gutenberg block next post & previous post to same category?
How can I disable fontSizes of the Paragraph block inside the Quote block with theme.json?
There is a No Results block that can be added to the query loop block. Any inner blocks added to it will be displayed when there are no results. Most blocks are supported as inner blocks. Here’s the markup of an example where I added a group block containing a paragraph block: <!– wp:query-no-results –> … Read more
Block development: how to bump version on generated css files?