docs: rich text upload element
This commit is contained in:
@@ -58,6 +58,7 @@ The default `elements` available in Payload are:
|
|||||||
- `ol`
|
- `ol`
|
||||||
- `ul`
|
- `ul`
|
||||||
- [`relationship`](#relationship-element)
|
- [`relationship`](#relationship-element)
|
||||||
|
- [`upload`](#upload-element)
|
||||||
|
|
||||||
**`leaves`**
|
**`leaves`**
|
||||||
|
|
||||||
@@ -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.
|
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">
|
<Banner type="success">
|
||||||
<strong>Tip:</strong><br/>
|
<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>
|
</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
|
### Specifying which elements and leaves to allow
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user