Fields
Rich text
Used for rich text / WYSIWYG content
Installation
npx shadcn@latest add https://payload-bricks.bblank.dev/r/rich-text-field.jsonUsage
import { richTextField } from "@/fields/rich-text"
import type { Block } from "payload"
export const ExampleBlock: Block = {
slug: "example",
interfaceName: "Example",
fields: [
// your other fields
richTextField,
],
}import { RichText } from "@/components/rich-text"
import type { Example } from "@/payload-types"
export function ExampleBlock(props: Example) {
return props.richText ? <RichText data={props.richText} /> : null
}Field structure
| name | type | |
|---|---|---|
richText | rich text |
Customization
Pass enableProse={false} to remove the default max-w-prose class.