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.

Cannot set lexical editor in Payload config?

default discord avatar
iokl2 years ago
4

As in the picture, it seems I cannot use lexical editor for some reasons. Perhaps I misconfigured, or maybe this error is due to my TypeScript config somewhere else. Can anyone shed a light on this?


The error is in

payload.config.ts

,



export default buildConfig({
  serverURL: process.env.PAYLOAD_PUBLIC_SERVER_URL ?? 'http://localhost:3001',
  admin: {
    user: Users.slug,
    bundler: viteBundler(),
  },
  editor: lexicalEditor({}),
  ...
});
  • discord user avatar
    denolfe
    2 years ago

    Hmm, that looks proper to me. Can you bump to latest version of Payload and the editor if you haven't already?

  • default discord avatar
    iokl2 years ago

    So after a lengthy attempts to troubleshoot nothing works, I decided to reinstall the

    node_modules

    and now things are fine, Oh well, ...

  • discord user avatar
    alessiogr
    2 years ago

    This issue has been fixed in the latest version of richtext-lexical which was released yesterday! Deleting node_modules and re-installing it might have updated it to the latest version, which fixed it 🙂

  • default discord avatar
    iokl2 years ago

    That explains it. Thanks for the great plugin again Alessio. 👍

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.