Hi everyone,
I’ve been trying to embed custom blocks inside a richText field using the BlocksFeature, but the block options just don’t appear in the Lexical editor UI.
Here’s my field configuration:
{
name,
type: 'richText',
editor: lexicalEditor({
features: ({ defaultFeatures }) => [
...defaultFeatures,
BlocksFeature({
blocks: [
{
slug: 'myBlock',
fields: [textField('someText')],
},
],
}),
],
}),
}I’ve used BlocksFeature successfully in another project with no issues, but for some reason it’s not working here — the block picker doesn’t appear at all.
Has anyone run into something similar or know what could be missing here?
I’ve double-checked that the Lexical editor and Payload versions are up to date.
Any ideas or troubleshooting steps would be appreciated! 🙏
@969226489549713438
Have you seen this one? I've been trying to get it working but didn't have any success.
Seen this sometimes, but every time I've seen this it was a random user error (e.g. forgot to push code, build didn't deploy successfully, accidentally changed wrong richtext field, accidentally overriding features...)
missing importmap update has also caused issue for me about picker not appearing
You're right. Seems like
BlocksFeatureClientisn't imported in import map.
I've run
payload generate:importmapbut it's still not importing
BlocksFeatureClientPS: I'm making changes and importing the correct field. I've checked more than once.

⨯ Error: Could not find the module "[project]/node_modules/@payloadcms/richtext-lexical/dist/exports/client/index.js#BlocksFeatureClient" in the React Client Manifest. This is probably a bug in the React Server Components bundler.
at stringify (<anonymous>) {
digest: '764469830'
}I do get this warning when I manually add imports to the
importMap.tsFinally managed to fix this! I had payload root in a different directory than usual.
Adding this to the payload config fixed the
importMapgeneration.
importMapFile: path.resolve(dirname,'app/(payload)/payload/admin/importMap.ts')Star
Discord
online
Get dedicated engineering support directly from the Payload team.