Skip to content

feat(prompt-input): Add PromptInputRichtext with Lexical-powered markdown editing#403

Open
omaroubari wants to merge 5 commits intovercel:mainfrom
omaroubari:feat/prompt-input-richtext-editor
Open

feat(prompt-input): Add PromptInputRichtext with Lexical-powered markdown editing#403
omaroubari wants to merge 5 commits intovercel:mainfrom
omaroubari:feat/prompt-input-richtext-editor

Conversation

@omaroubari
Copy link

Summary

Screenshot

image

Why Lexical

I chose Lexical because it gives us a lightweight, React-friendly editor with a solid plugin model and the exact primitives we needed for markdown shortcuts, autolinking, history, and controlled state sync without overhauling the existing PromptInput API.

Alternatives considered

I considered extending the existing PromptInputTextarea with more custom markdown behavior, and using the ProseMirror editor stack. Lexical felt like the best fit because it hits a good balance of flexibility, integration simplicity, and runtime weight for this composer use case. I haven't previously worked with ProseMirror, but I'll be happy to refactor if someone more experienced deems it a better fit. I think at some point this library will have a DocumentEditor component for editing artifacts like the ChatGPT canvas, which will require thinking well about the editor we will adopt.

@vercel
Copy link
Contributor

vercel bot commented Mar 22, 2026

@omaroubari is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link

socket-security bot commented Mar 22, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​lexical/​link@​0.42.010010073100100
Addedlexical@​0.42.09410099100100
Added@​lexical/​markdown@​0.42.09710098100100
Added@​lexical/​react@​0.42.09910098100100

View full report

@omaroubari omaroubari force-pushed the feat/prompt-input-richtext-editor branch from e8e08ec to dd7ee1d Compare March 22, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant