Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/reference-guides/block-api/block-supports.md
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,21 @@ When the block declares support for `color.text`, the attributes definition is e
}
```

## contentRole

_**Note:** Since WordPress 6.9._

- Type: `boolean`
- Default value: `false`

Marks the block itself as content. It is intended primarily for blocks that do not declare `content` attributes, or whose content is expressed only through their inner blocks. When enabled, content-only editing modes can still edit these blocks and allow inner blocks to be added or removed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but double checking with @tellthemachines who has been looking at this role for other blocks in #75812

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah LGTM! #75812 doesn't change the behaviour of contentRole, it only changes the ability to insert blocks in containers with content attributes.


```js
supports: {
contentRole: true
}
```

## customClassName

- Type: `boolean`
Expand Down Expand Up @@ -853,6 +868,25 @@ For the `flex` layout type only, determines display of the "Allow to wrap to mul
For the `constrained` layout type only, determines display of the custom content and wide size controls in the block sidebar.
## listView
_**Note:** Since WordPress 7.0._
- Type: `boolean`
- Default value: `false`
Enables a List View panel in the block inspector for the block's inner blocks.

When this support is enabled, the inspector shows a List View tree allowing users to inspect and manage the block's inner blocks from the sidebar instead of only using the global document List View.
```js
supports: {
listView: true
}
```
The `listView` support only affects the editor UI and does not add any attributes to the block.
## lock
- Type: `boolean`
Expand Down
10 changes: 10 additions & 0 deletions schemas/json/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,16 @@
}
]
},
"contentRole": {
"description": "This property marks the block itself as content. It is intended primarily for blocks that do not declare content attributes, or whose content is expressed only through their inner blocks. When enabled, content-only editing modes can still edit these blocks and allow inner blocks to be added or removed.",
"type": "boolean",
"default": false
},
"listView": {
"description": "This property enables a dedicated List View panel in the block inspector for the block. When enabled, the inspector shows a List View tree for the block's inner blocks, allowing users to inspect, reorder, and manage the block's items from the sidebar instead of only using the global document List View.",
"type": "boolean",
"default": false
},
"splitting": {
"description": "This property indicates whether the block can split when the Enter key is pressed or when blocks are pasted.",
"type": "boolean",
Expand Down
Loading