Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

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

default discord avatar
bettrapplast year
3

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
    dribbens
    last year

    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

    @360823574644129795

    knows about.

  • discord user avatar
    alessiogr
    last year

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

  • default discord avatar
    th3g3ntl3m4n97last year

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



    editor: lexicalEditor({}) as RichTextAdapter,
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.