Skip to content

Commit

Permalink
Block supports: splitting: add docs (WordPress#63016)
Browse files Browse the repository at this point in the history
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>
  • Loading branch information
3 people authored Jul 1, 2024
1 parent 2e367a1 commit 1f876be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/reference-guides/block-api/block-supports.md
Original file line number Diff line number Diff line change
Expand Up @@ -1110,3 +1110,11 @@ attributes: {
}
}
```

## splitting

When set to `true`, `Enter` will split the block into two blocks. Note that this
is only meant for simple text blocks such as paragraphs and headings with a
single `RichText` field. RichText in the `edit` function _must_ have an
`identifier` prop that matches the attribute key of the text, so that it updates
the selection correctly and we know where to split.

0 comments on commit 1f876be

Please sign in to comment.