From 49cbb8348af4083433fac4c51930db3c5791c62b Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Thu, 21 Mar 2024 12:30:16 +0100 Subject: [PATCH] RichText: document the identifier prop --- packages/block-editor/src/components/rich-text/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/block-editor/src/components/rich-text/README.md b/packages/block-editor/src/components/rich-text/README.md index 4251debfa16c54..d6469bf098145b 100644 --- a/packages/block-editor/src/components/rich-text/README.md +++ b/packages/block-editor/src/components/rich-text/README.md @@ -12,6 +12,10 @@ _Required._ HTML string to make editable. The HTML should be valid, and valid in _Required._ Called when the value changes. +### `identifier: String` + +_Optional._ If the editable field is bound to a block attribute (through the `value` and `onChange` props) then this prop should specify the attribute name. The field will use this value to set the block editor selection correctly, specifying in which attribute and at what offset does the selection start or end. + ### `tagName: String` _Default: `div`._ The [tag name](https://www.w3.org/TR/html51/syntax.html#tag-name) of the editable element. @@ -50,6 +54,7 @@ _Optional._ By default, all registered formats are allowed. This setting can be ```js setAttributes( { content } ) } @@ -99,6 +104,7 @@ registerBlockType( /* ... */, { setAttributes( { content } ) } />