you have to change it in plugin not collection.
i will give you my postmedia collection eg
import { superAdmin } from '@/access/superAdmin'
import {
FixedToolbarFeature,
InlineToolbarFeature,
lexicalEditor,
} from '@payloadcms/richtext-lexical'
import type { CollectionConfig } from 'payload'
import { v4 as uuidv4 } from 'uuid'
import { anyone } from '../access/anyone'
import { authenticated } from '../access/authenticated'
export const PostMedia: CollectionConfig = {
slug: 'postmedia',
labels: {
singular: 'Post Media',
plural: 'Post Media',
},
access: {
create: authenticated,
delete: authenticated,
read: anyone,
update: authenticated,
},
admin: {
defaultColumns: ['filename', 'alt', 'updatedAt'],
useAsTitle: 'alt',
hideAPIURL: !superAdmin,
group: 'Media Assets',
},
fields: [
{
name: 'alt',
type: 'text',
required: true,
},
{
name: 'caption',
type: 'richText',
editor: lexicalEditor({
features: ({ rootFeatures }) => {
return [...rootFeatures, FixedToolbarFeature(), InlineToolbarFeature()]
},
}),
},
{
name: 'prefix',
type: 'text',
admin: {
hidden: true,
},
},
],