Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LexicalEditor doesn't show the panel inside the blocks type #7024

Closed
vuquangpham opened this issue Jul 3, 2024 · 6 comments
Closed

LexicalEditor doesn't show the panel inside the blocks type #7024

vuquangpham opened this issue Jul 3, 2024 · 6 comments
Labels
plugin: richtext-lexical @payloadcms/richtext-lexical v3

Comments

@vuquangpham
Copy link

Link to reproduction

No response

Payload Version

v3.0.0-beta.57 (2024-07-02)

Node Version

22.3.0

Next.js Version

15.rc

Describe the Bug

Can not show the panel of the lexical editor inside the field of blocks type

// build config
export default buildConfig({
	admin: {
		user: Users.slug,
	},

	// Define and configure your collections in this array
	collections: [Media, Pages, Users],

	typescript: {
		outputFile: path.resolve(dirname, "payload-types.ts"),
	},

	// If you'd like to use Rich Text, pass your editor here
	editor: lexicalEditor(),

	// Your Payload secret - should be a complex and secure string, unguessable
	secret: ENV.PAYLOAD_SECRET,

	// Whichever database adapter you're using should go here
	// Mongoose is shown as an example, but you can also use Postgres
	db: mongooseAdapter({
		url: ENV.PAYLOAD_DATABASE_URI,
	}),

	// If you want to resize images, crop, set focal point, etc.
	// make sure to install it and pass it to the config.
	// This is optional - if you don't need to do these things,
	// you don't need it!
	sharp,

	plugins: [
		// storage-adapter-placeholder
	],
});
// collections
export const Pages: CollectionConfig = {
	slug: "pages",

	admin: {
		// useAsTitle: "title",
	},

	fields: [
		{
			name: "title",
			type: "richText",
			required: true,
		},
		{
			name: "components",
			blocks: [Accordion],
			type: "blocks",
			required: true,
		},
		{ ...created },
		{ ...modified },
	],
	versions: {
		drafts: true,
	},
};
// block
export const Accordion: Block = {
	slug: "accordion",
	fields: [
		{
			name: "heading",
			type: "text",
		},
		{
			name: "content",
			type: "richText",
			required: true,
			editor: lexicalEditor(),
		},
	],
};

Reproduction Steps

Screen.Recording.2024-07-03.at.22.12.13.mov

Adapters and Plugins

No response

@vuquangpham vuquangpham added status: needs-triage Possible bug which hasn't been reproduced yet v3 labels Jul 3, 2024
@AlessioGr
Copy link
Member

What do you mean with "panel"?

@vuquangpham
Copy link
Author

@AlessioGr sorry for missing a descriptive, I mean this

Screenshot 2024-07-03 at 22 36 35

@vuquangpham
Copy link
Author

Not able to show this panel inside the block of the block types

@AlessioGr AlessioGr added the plugin: richtext-lexical @payloadcms/richtext-lexical label Jul 3, 2024
@ainsleyclark
Copy link

I'm having a similar issue with Lexical

https://discord.com/channels/967097582721572934/1257686600788217856/1258073199611215982

@AlessioGr AlessioGr added the status: verified If an issue has been reproduced label Jul 5, 2024
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Jul 5, 2024
@AlessioGr
Copy link
Member

Reproduced this. This happens only if any field in the chain is named components.

@AlessioGr
Copy link
Member

Fixed by #7042

@github-actions github-actions bot removed the status: verified If an issue has been reproduced label Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: richtext-lexical @payloadcms/richtext-lexical v3
Projects
None yet
Development

No branches or pull requests

3 participants