32 lines
No EOL
571 B
TypeScript
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"
|
|
}
|
|
]
|
|
} |