Data
An object produced by Puck describing the shape of content.
{
"content": [
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234",
"title": "Hello, world"
}
}
],
"root": { "props": { "title": "Puck Example" } },
"zones": {}
}
content
An array containing an object for each component in the main content region.
content[*]
Params
Param | Example | Type | Status |
---|---|---|---|
type | type: "HeadingBlock" | "array" | Required |
props | props: { title: "Hello, world" } | Object | Required |
readOnly | readOnly: { title: true } | Object | - |
Required params
content[*].type
The type of the component, which tells Puck to run the render()
method for the component of the same key.
content[*].props
The props stored based on the component config
that Puck will pass to the render()
method for the component of the same key.
{
"content": [
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234",
"title": "Hello, world"
}
}
],
"root": {},
"zones": {}
}
Optional params
content[*].readOnly
An object describing which fields are set to read-only.
{
"content": [
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234",
"title": "Hello, world"
},
"readOnly": {
"title": true
}
}
],
"root": {},
"zones": {}
}
root
An object describing data for the root
config.
Params
Param | Example | Type | Status |
---|---|---|---|
props | props: { title: "Hello, world" } | Object | - |
readOnly | readOnly: { title: true } | Object | - |
Optional params
root.props
The props stored based on the component config
that Puck will pass to the render()
method for the root
config.
{
"content": [],
"root": { "props": { "title": "Puck Example" } },
"zones": {}
}
root.readOnly
An object describing which fields are set to read-only.
{
"content": [],
"root": {
"readOnly": {
"title": true
}
},
"zones": {}
}
zones
An object describing nested content regions for each DropZone.
zones[zoneKey]
An array describing the content for a particular region. Shares a shape with content
.
zoneKey
is a compound of the component id
and DropZone zone
.
{
"content": [],
"root": {},
"zones": {
"HeadingBlock-1234:my-content": [
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234",
"title": "Hello, world"
}
}
]
}
}