We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export const ContentField: Slug = (fieldToUse = 'title', overrides = {}) => deepMerge<Field, Partial>( { name: 'content', type: 'richText', editor: lexicalEditor({ features: ({ defaultFeatures, rootFeatures }) => [ ...defaultFeatures, LinkFeature({ // Example showing how to customize the built-in fields // of the Link feature fields: ({ defaultFields }) => [ ...defaultFields, { name: 'rel', label: 'Rel Attribute', type: 'select', hasMany: true, options: ['noopener', 'noreferrer', 'nofollow'], admin: { description: 'The rel attribute defines the relationship between a linked resource and the current document. This is a custom link field.', }, }, ], }), UploadFeature({ collections: { uploads: { // Example showing how to customize the built-in fields // of the Upload feature fields: [ { name: 'caption', type: 'richText', editor: lexicalEditor(), }, ], }, }, }), // Payload Ext // TextColorFeature({ // colors: [ // { // type: 'button', // label: 'Custom color', // color: '#1155aa', // }, // ], // }), // HighlightColorFeature(), // BgColorFeature(), YoutubeFeature(), // This is incredibly powerful. You can re-use your Payload blocks // directly in the Lexical editor as follows: // BlocksFeature({ // blocks: [Cta, Disclaimer], // }), ], }), }, overrides, )
The text was updated successfully, but these errors were encountered:
Seems like your color features are commented, did you test this with those lines uncommented?
Sorry, something went wrong.
Yes
No branches or pull requests
export const ContentField: Slug = (fieldToUse = 'title', overrides = {}) =>
deepMerge<Field, Partial>(
{
name: 'content',
type: 'richText',
editor: lexicalEditor({
features: ({ defaultFeatures, rootFeatures }) => [
...defaultFeatures,
LinkFeature({
// Example showing how to customize the built-in fields
// of the Link feature
fields: ({ defaultFields }) => [
...defaultFields,
{
name: 'rel',
label: 'Rel Attribute',
type: 'select',
hasMany: true,
options: ['noopener', 'noreferrer', 'nofollow'],
admin: {
description:
'The rel attribute defines the relationship between a linked resource and the current document. This is a custom link field.',
},
},
],
}),
UploadFeature({
collections: {
uploads: {
// Example showing how to customize the built-in fields
// of the Upload feature
fields: [
{
name: 'caption',
type: 'richText',
editor: lexicalEditor(),
},
],
},
},
}),
// Payload Ext
// TextColorFeature({
// colors: [
// {
// type: 'button',
// label: 'Custom color',
// color: '#1155aa',
// },
// ],
// }),
// HighlightColorFeature(),
// BgColorFeature(),
YoutubeFeature(),
// This is incredibly powerful. You can re-use your Payload blocks
// directly in the Lexical editor as follows:
// BlocksFeature({
// blocks: [Cta, Disclaimer],
// }),
],
}),
},
overrides,
)
The text was updated successfully, but these errors were encountered: