
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
guten-block-fields
Advanced tools
WordPress Gutenberg development tool.
When you creating blocks in Gutenberg, You may want more fields to manage the block's content. Gutenberg has a section called Inspector Controller which appears on the right side of the block when you click on particular block on editor. This package will help you to create those field in more easy way.
$ npm install guten-block-fields
$ guten-block-fields make
Click Here to see documentation.
Click Here To watch the video demo.
To create or manage block's field you'll need to create a block-fields.json file in your plugin's root folder.
A block-fields.json file:
Type: string
Name of your component.
Type: string
The path where you want to land of the generated files.
Type: object
List of the toggle
Example:
"toggles": {
"bio": {
"title": "Bio data",
"isOpen": true,
},
"occuption": {
"title":"Occuption",
"isOpen":false
}
}
Type: array
Pass the list of the field which needs to be required generated.
title Title or label of the field.id id of the field.type Type of the field.value Default value of the field.toggle Toggle id in which this field should be appear. See "toggle" option above.baseControl Whether field should wrapper inside the or not.Render
{
"title": "Your Name",
"id": "your-name",
"type": "text",
"value": "john doe",
"toggle": "bio",
"baseControl": true
}
Render
Additional option:
checked <true|false>{
"title": "Accept t&c",
"label": "Sample",
"id": "sample",
"toggle": "bio",
"checked": true,
"type": "checkbox"
},
Render <Button />
{
"title": "Save Changes",
"type": "button",
"id": "save-change",
"toggle": "occuption",
"default": false,
"class": "save"
},
Render <ButtonGroup />
{
"title": "Button Group",
"type": "button-group",
"id": "button-group",
"toggle": "occuption",
"buttons": [
{
"isPrimary": true,
"class": "red",
"label": "Red",
"id": "red"
},
{
"isPrimary": false,
"class": "blue",
"label": "Blue",
"id": "blue"
}
]
},
Render <Select />
{
"type": "select",
"value": "india",
"id": "country",
"title": "Country",
"options": [
{
"label": "India",
"value": "india"
},
{
"label": "USA",
"value": "usa"
}
]
},
Render <RadioControl />
{
"type": "radio",
"title": "Gender",
"id": "gender",
"value": "male",
"options": [
{
"label": "Male",
"value": "male"
},
{
"label": "Female",
"value": "female"
}
]
},
Render <RangeControl />
{
"type": "range",
"title": "Volume",
"id": "volume",
"min": 1,
"max": 100,
"value": 40
}
Render <ColorPalette />
{
"type": "color",
"title": "Background Color",
"id": "bg-color",
"value": '#fff',
"colors": [
{
"name": "red",
"color": "#f00"
},
{
"name": "blue",
"color": "#00f"
},
{
"name": "black",
"color": "#000"
}
]
}
Render <TreeSelect />
{
"title": "Select Post",
"type" : "tree",
"optionlabel": "Select option",
"selectedId": "p211",
"tree":[
{
name: 'Post 1',
id: 'p1',
children: [
{ name: 'Descend 1 of post 1', id: 'p11' },
{ name: 'Descend 2 of post 1', id: 'p12' },
],
},
{
name: 'post 2',
id: 'p2',
children: [
{
name: 'Descend 1 of post 2',
id: 'p21',
children: [
{
name: 'Descend 1 of Descend 1 of post 2',
id: 'p211',
},
],
},
],
},
]
}
Render <DateTime />
{
"title": "Select Date and Time",
"id": "date-posting",
"type": "datetime",
"is12hours": true,
"locale": ""
}
Thanks! ;)
FAQs
Generate or manage block fields for using a single JSON file.
We found that guten-block-fields demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.