Payload Adsign Plugin

Rich Text Field

Pre-configured Lexical editor

Usage

collections/Articles/index.ts
import { richTextField } from '@adsign/payload-adsign-plugin';

richTextField({
  name: 'content',
  label: 'Content',
  type: 'full',
})

Variants

Simple: Bold, italic, underline, lists, links
Full: All simple features + strikethrough, headings, blocks, inline code

Options

OptionTypeRequiredDescription
namestringYesField name
type'simple' | 'full'YesEditor variant
labelstringNoField label
blocksstring[]NoCustom blocks
inlineBlocksstring[]NoInline blocks
linkEnabledCollectionsstring[]NoCollections for links
enabledHeadingSizesstring[]NoAllowed headings
additionalFeaturesFeature[]NoCustom Lexical features

Examples

With blocks:

richTextField({
  name: 'content',
  label: 'Content',
  type: 'full',
  blocks: ['imageBlock', 'videoBlock'],
})

Only H2 and H3:

richTextField({
  name: 'content',
  label: 'Content',
  type: 'full',
  enabledHeadingSizes: ['h2', 'h3'],
})

On this page