Skip to content

Commit

Permalink
Block supports: splitting: add docs (#63016)
Browse files Browse the repository at this point in the history
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>
Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org>
  • 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.

1 comment on commit 1f876be

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in 1f876be.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9745101885
📝 Reported issues:

Please sign in to comment.