church-website/src/collections/blocks/Paragraph.ts
2024-11-20 15:21:45 +01:00

32 lines
No EOL
571 B
TypeScript

import { Block } from 'payload'
import { lexicalHTML } from '@payloadcms/richtext-lexical'
export const ParagraphBlock: Block = {
slug: 'text',
labels: {
singular: {
de: 'Text'
},
plural: {
de: 'Text'
}
},
fields: [
{
name: 'content',
type: 'richText',
required: true
},
lexicalHTML('content', { name: 'content_html' }),
{
name: 'width',
label: {
de: "Breite"
},
type: 'radio',
options: ["1/2", "3/4"],
required: true,
defaultValue: "1/2"
}
]
}