Skip to content

Commit

Permalink
Fixing broken links and adding colon (#37664)
Browse files Browse the repository at this point in the history
* Fixing broken links and adding colon

* Apply suggestions from code review

Co-authored-by: Marcus Kazmierczak <[email protected]>
  • Loading branch information
ugljanin and mkaz committed Dec 31, 2021
1 parent a90a964 commit a80da69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/reference-guides/block-api/block-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -230,7 +230,7 @@ Saved content:

Attribute definition:
```js
attributes {
attributes: {
content: {
type: 'string',
source: 'text',
Expand Down

0 comments on commit a80da69

Please sign in to comment.