Let me know in a different thread that "The toolbar itself is a feature too. You need to add
InlineToolbarFeature
and/or
FixedToolbarFeature
", My new code that works is this, I moved to importing the features I want and adding vs filtering:
import {
lexicalEditor,
BoldFeature,
UnderlineFeature,
OrderedListFeature,
UnorderedListFeature,
LinkFeature,
ItalicFeature,
FixedToolbarFeature,
} from '@payloadcms/richtext-lexical'
const field = {
name: 'description',
type: 'richText',
label: 'Description',
editor: lexicalEditor({
features: [
BoldFeature(),
UnderlineFeature(),
OrderedListFeature(),
UnorderedListFeature(),
LinkFeature(),
ItalicFeature(),
FixedToolbarFeature(),
],
}),
}
Does disabling features, remove the pop up toolbar that shows bold, italic etc? It appears to be the case for me, using payload 3.0 beta 113. If its belived ot be a bug I will make a bug report
Thanks,
@360823574644129795!
Yea that's the way to do it! Or you can just not use
defaultFeatures
and provide all features yourself
Hey, is there a better way to disable lexical features? I want to have only link, bold and italic features in my rich text. Here's how I'm doing it now (which seems a little cumbersome).
Star
Discord
online
Get dedicated engineering support directly from the Payload team.