From 1f876be7afcc82b8c04ed330a55abb96cb24dcc9 Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Mon, 1 Jul 2024 16:25:08 +0300 Subject: [PATCH] Block supports: splitting: add docs (#63016) Co-authored-by: ellatrix Co-authored-by: fabiankaegy --- docs/reference-guides/block-api/block-supports.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/reference-guides/block-api/block-supports.md b/docs/reference-guides/block-api/block-supports.md index b327cd0c03a9e..a15191c19ffb7 100644 --- a/docs/reference-guides/block-api/block-supports.md +++ b/docs/reference-guides/block-api/block-supports.md @@ -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.