Skip to content

Commit

Permalink
docs: rich text upload element
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikrut committed Sep 28, 2021
1 parent b4334b2 commit 2e64fcf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions docs/fields/rich-text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The default `elements` available in Payload are:
- `ol`
- `ul`
- [`relationship`](#relationship-element)
- [`upload`](#upload-element)

**`leaves`**

Expand All @@ -79,12 +80,16 @@ Set this property to `true` to hide this field's gutter within the admin panel.

The built-in `relationship` element is a powerful way to reference other Documents directly within your Rich Text editor.

### Upload element

Similar to the `relationship` element, the `upload` element is a user-friendly way to reference [Upload-enabled collections](/docs/upload/overview) with a UI specifically designed for media / image-based uploads.

<Banner type="success">
<strong>Tip:</strong><br/>
Collections are automatically allowed to be selected within the Rich Text relationship by default. If you want to disable a collection from being able to be referenced in Rich Text fields, set the collection admin option of <strong>enableRichTextRelationship</strong> to false.
Collections are automatically allowed to be selected within the Rich Text relationship and upload elements by default. If you want to disable a collection from being able to be referenced in Rich Text fields, set the collection admin option of <strong>enableRichTextRelationship</strong> to false.
</Banner>

Relationships are populated dynamically into your Rich Text field' content. Within the REST and Local APIs, any present RichText `relationship` elements will respect the `depth` option that you pass, and will be populated accordingly. In GraphQL, each `richText` field accepts an argument of `depth` for you to utilize.
Relationship and Upload elements are populated dynamically into your Rich Text field' content. Within the REST and Local APIs, any present RichText `relationship` or `upload` elements will respect the `depth` option that you pass, and will be populated accordingly. In GraphQL, each `richText` field accepts an argument of `depth` for you to utilize.

### Specifying which elements and leaves to allow

Expand Down

0 comments on commit 2e64fcf

Please sign in to comment.