I would need some help regarding creating a custom toolbar for PayloadCMS RTE.
The current version is PayloadCMS 3.49.1, and linked with @payloadcms/richtext-lexical version of 0.28.0.
My goal is to create an ordered list using alphabetical and roman numerals.
I have tried to upgrade the version to 3.55.1, but without any result.
Can I use the current version of 3.49.1 to create the custom toolbars?
This is my current code
import {
FixedToolbarFeature,
HeadingFeature,
InlineToolbarFeature,
lexicalEditor,
BlocksFeature,
TextStateFeature,
defaultColors,
} from '@payloadcms/richtext-lexical'
import { Banner } from '@/blocks/Banner/config'
import { Content } from '@/blocks/Content/config'
export const customFeature = (defaultFeatures: any) => {
return [
...defaultFeatures.filter(
(feature: any) => !['inlineCode', 'checklist', 'blockquote'].includes(feature.key),
),
FixedToolbarFeature(),
BlocksFeature({
blocks: [Banner, Content],
}),
TextStateFeature(),
]
}
createClientFeature({ key: 'custom-list-buttons', clientFeature: { ToolbarComponent: CustomListButton, }, }),