From 1f262184cd77a56be1f339a4954661265696041d Mon Sep 17 00:00:00 2001 From: Emir Ugljanin Date: Thu, 30 Dec 2021 15:38:28 +0100 Subject: [PATCH 1/2] Fixing broken links and adding colon --- docs/reference-guides/block-api/block-attributes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference-guides/block-api/block-attributes.md b/docs/reference-guides/block-api/block-attributes.md index 78329b5823e19..00c1c1e16295e 100644 --- a/docs/reference-guides/block-api/block-attributes.md +++ b/docs/reference-guides/block-api/block-attributes.md @@ -44,7 +44,7 @@ function YourBlockEdit( { attributes } ) { The block is responsible for using the `save` function to ensure that all attributes with a `source` field are saved according to the attributes definition. This is not automatic. -Attributes without a `source` will be automatically saved in the block [comment delimiter](/docs/getting-started/architecture/key-concepts.md#delimiters-and-parsing-expression-grammar). +Attributes without a `source` will be automatically saved in the block [comment delimiter](/docs/explanations/architecture/key-concepts.md#data--attributes). For example, using the above attributes definition you would need to ensure that your `save` function has a corresponding img tag for the `url` attribute. The `title` and `size` attributes will be saved in the comment delimiter. @@ -105,7 +105,7 @@ _Example_: Example `enum`. Attribute sources are used to define how the attribute values are extracted from saved post content. They provide a mechanism to map from the saved markup to a JavaScript representation of a block. The available `source` values are: -- `(no value)` - when no `source` is specified then data is stored in the block's [comment delimiter](/docs/getting-started/architecture/key-concepts.md#delimiters-and-parsing-expression-grammar). +- `(no value)` - when no `source` is specified then data is stored in the block's [comment delimiter](/docs/explanations/architecture/key-concepts.md#data--attributes). - `attribute` - data is stored in an HTML element attribute. - `text` - data is stored in HTML text. - `html` - data is stored in HTML. This is typically used by `RichText`. @@ -230,7 +230,7 @@ Saved content: Attribute definition: ```js -attributes { +attributes: { content: { type: 'string', source: 'text', From 732f1471f004f4ebd44f6a5d8e5c6fad9dbae77b Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Thu, 30 Dec 2021 18:57:12 -0800 Subject: [PATCH 2/2] Apply suggestions from code review --- docs/reference-guides/block-api/block-attributes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference-guides/block-api/block-attributes.md b/docs/reference-guides/block-api/block-attributes.md index 00c1c1e16295e..e3eb3c9903bc4 100644 --- a/docs/reference-guides/block-api/block-attributes.md +++ b/docs/reference-guides/block-api/block-attributes.md @@ -44,7 +44,7 @@ function YourBlockEdit( { attributes } ) { The block is responsible for using the `save` function to ensure that all attributes with a `source` field are saved according to the attributes definition. This is not automatic. -Attributes without a `source` will be automatically saved in the block [comment delimiter](/docs/explanations/architecture/key-concepts.md#data--attributes). +Attributes without a `source` will be automatically saved in the block [comment delimiter](/docs/explanations/architecture/key-concepts.md#data-attributes). For example, using the above attributes definition you would need to ensure that your `save` function has a corresponding img tag for the `url` attribute. The `title` and `size` attributes will be saved in the comment delimiter. @@ -105,7 +105,7 @@ _Example_: Example `enum`. Attribute sources are used to define how the attribute values are extracted from saved post content. They provide a mechanism to map from the saved markup to a JavaScript representation of a block. The available `source` values are: -- `(no value)` - when no `source` is specified then data is stored in the block's [comment delimiter](/docs/explanations/architecture/key-concepts.md#data--attributes). +- `(no value)` - when no `source` is specified then data is stored in the block's [comment delimiter](/docs/explanations/architecture/key-concepts.md#data-attributes). - `attribute` - data is stored in an HTML element attribute. - `text` - data is stored in HTML text. - `html` - data is stored in HTML. This is typically used by `RichText`.