Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlessioGr committed Dec 31, 2024
1 parent ce6647c commit 4f0d75a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 2 additions & 8 deletions docs/fields/rich-text.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ _* An asterisk denotes that a property is required._

## Admin Options

The customize the appearance and behavior of the Rich Text Field in the [Admin Panel](../admin/overview), you can use the `admin` option:
The customize the appearance and behavior of the Rich Text Field in the [Admin Panel](../admin/overview), you can use the `admin` option. The Rich Text Field inherits all of the default options from the base [Field Admin Config](../admin/fields#admin-options)

```ts
import type { Field } from 'payload'
Expand All @@ -58,13 +58,7 @@ export const MyRichTextField: Field = {
}
```

The Rich Text Field inherits all of the default options from the base [Field Admin Config](../admin/fields#admin-options), plus the following additional options:

| Property | Description |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| **`placeholder`** | Set this property to define a placeholder string for the field. |
| **`hideGutter`** | Set this property to `true` to hide this field's gutter within the Admin Panel. |
| **`rtl`** | Override the default text direction of the Admin Panel for this field. Set to `true` to force right-to-left text direction. |
Further customization can be done with editor-specific options.

## Editor-specific Options

Expand Down
9 changes: 8 additions & 1 deletion docs/rich-text/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,16 @@ Lexical does not generate the accurate type definitions for your richText fields

## Admin customization

The Rich Text Field editor configuration has an `admin` property with the following options:

| Property | Description |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| **`placeholder`** | Set this property to define a placeholder string for the field. |
| **`hideGutter`** | Set this property to `true` to hide this field's gutter within the Admin Panel. |

### Disable the gutter

You can disable the gutter (the vertical line padding between the editor and the left edge of the screen) by setting the `hideGutter` prop to `true`:
You can disable the gutter (the vertical line padding between the editor and the left edge of the screen) by setting the `hideGutter` prop to `true`:

```ts
{
Expand Down

0 comments on commit 4f0d75a

Please sign in to comment.