-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
created-by: Contributorplugin: richtext-lexical@payloadcms/richtext-lexical@payloadcms/richtext-lexicalstatus: needs-triagePossible bug which hasn't been reproduced yetPossible bug which hasn't been reproduced yet
Description
Describe the Bug
When converting Lexical State to Markdown, Upload Nodes are not being converted and a blank line is entered in the markdown output.
Expected output: I would be happy with just about any text value that includes the upload collection slug and id.
Actual output: a blank line
Link to the code that reproduces this issue
Reproduction Steps
- Ensure you are on the lexical-to-markdown-fails-to-convert-uploads branch of the attached codebase
- Run
pnpm dev _community - Access admin panel at localhost:3000/admin
- Open the example post in Posts collection in edit view
- Add an Upload node in the Content Fields lexical editor
- Click save
- View markdown output in the Markdown field and see that there is no output for the upload node
Additionally, if you want.
switch to the fix-lexical-to-markdown-fails-to-convert-uploads branch and run the above steps again. I have provided a basic fix for converting lexical Upload Nodes to markdown. markdown to lexical is not provided, I didn't see a use case for this, maybe there is one?
Which area(s) are affected? (Select all that apply)
plugin: richtext-lexical
Environment Info
Payload: 3.37.0
Node.js: 22.9.0
Next.js: 15.3.0
MichielDeMey
Metadata
Metadata
Assignees
Labels
created-by: Contributorplugin: richtext-lexical@payloadcms/richtext-lexical@payloadcms/richtext-lexicalstatus: needs-triagePossible bug which hasn't been reproduced yetPossible bug which hasn't been reproduced yet