38 lines
741 B
TypeScript
38 lines
741 B
TypeScript
import Button from '../client/components/richText/elements/Button';
|
|
import PurpleBackground from '../client/components/richText/leaves/PurpleBackground';
|
|
|
|
const RichText = {
|
|
slug: 'rich-text',
|
|
labels: {
|
|
singular: 'Rich Text',
|
|
plural: 'Rich Texts',
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'defaultRichText',
|
|
type: 'richText',
|
|
label: 'Default Rich Text',
|
|
required: true,
|
|
},
|
|
{
|
|
name: 'customRichText',
|
|
type: 'richText',
|
|
label: 'Customized Rich Text',
|
|
required: true,
|
|
admin: {
|
|
elements: [
|
|
'h2',
|
|
'h3',
|
|
Button,
|
|
],
|
|
leaves: [
|
|
'bold',
|
|
PurpleBackground,
|
|
],
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
export default RichText;
|