create-guten-block | 0CJS developer toolkit for building WordPress Gutenberg | Content Management System library
kandi X-RAY | create-guten-block Summary
kandi X-RAY | create-guten-block Summary
create-guten-block is zero configuration dev-toolkit (#0CJS) to develop WordPress Gutenberg blocks in a matter of minutes without configuring React, webpack, ES6/7/8/Next, ESLint, Babel, etc.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Remove a warning message from the Webpack output .
- Main build function
- Gets a translation comment node
- Find a module .
- Format a JSON errors array .
- Returns the string representation of a node .
- Verifies that a file exists .
- Get the git status .
- Check if two translation keys are valid .
- Clear output to console
create-guten-block Key Features
create-guten-block Examples and Code Snippets
Community Discussions
Trending Discussions on create-guten-block
QUESTION
I am using gutenbergs' core block to make another block using InnerBlock. So, I want to change their default style like text align center.To start, I used officially supported way to create blocks Create-Guten-Block. My codes are as follows:
...ANSWER
Answered 2022-Mar-07 at 04:10Yes, the core/button
block supports align and can be set in the block attribute align
within the InnerBlocks template, eg:
QUESTION
I'm trying to build a custom set of column blocks using InnerBlocks and am having trouble passing attributes to block templates. To start, I scaffolded a new plugin using Create-Guten-Block. I then created two blocks, one to serve as a row container, and one for individual columns.
Here is a simplified version of how I'm creating the main container (with two columns hard-coded for testing):
...ANSWER
Answered 2021-Oct-19 at 23:10The block code example you have provided shows you are setting up the InnerBlocks fine. The issue may be a simple oversight that you have missed importing the required dependancy of .
I was able to build your block code successfully once I added the required imports:
QUESTION
As the title states I am teaching myself how to create a custom Gutenburg Block for wordpress development and I have written the following code. It functions correctly when you save, but when you reload the saved page you get console errors and it shows
This block contains unexpected or invalid content.
When you click resolve it shows the following:
...ANSWER
Answered 2021-Jan-21 at 12:48The block validation issue is caused by a small typo where your attribute bgcolor
(case sensitive) is called as bgColor
in edit() and save().
Your code shows you are on the right path with creating your own custom Gutenberg block, so I'd like to share a suggestion to use array destructuring with props
to make your code much easier to read and maintain. Your custom onChange
functions which just call setAttributes()
can also be removed in favor of calling setAttributes directly, this reduces how much code you need to write and reduces the chance of typos too..
Eg:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install create-guten-block
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page