LexicalRichTextAdapter is not assignable to type 'RichTextAdapter<any, any>'

default discord avatar
last month

Trying out payload 2.0, but I'm running into the following type error in the payload.config.ts when adding the lexicalEditor.

Type 'LexicalRichTextAdapter' is not assignable to type 'RichTextAdapter<any, any>'.
  • discord user avatar
    Payload Team
    last month

    What version of lexical-editor is your project on?

    Can you share the import statement too?

    I have no idea just looking at this. It could be something @alessiogr knows about.

  • discord user avatar
    Payload Team
    last month

    this used to be an issue when typescript strict mode is on. Should definitely be fixed in the latest version though

  • default discord avatar
    last month

    I encountered the same issue with strict mode enabled and had to do a type assertion as a workaround

    editor: lexicalEditor({}) as RichTextAdapter,
Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!


Connect with the Payload Community on Discord



Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.