-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[lexical-playground] Feature: Create paragraphs around code #8072
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Just added a new plugin, @etrepum let me know if this doesnt belong to playground folder |
|
It's fine to have it in the playground, but this implementation breaks the markdown view functionality which expects the editor to contain only a CodeNode. This plugin would have to be aware of that editor mode and disabled accordingly. |
df8ea2d to
3f17056
Compare
|
You can run the e2e tests locally, have the playground running in one terminal with |
Description
This PR ensures that a paragraph node always exists before and after a code block. Currently, the absence of these nodes prevents the up and down arrow keys from functioning correctly. This change guarantees a "buffer" node (defaulting to a paragraph) to ensure consistent keyboard navigation.
Closes #7912
Before
Screen.Recording.2026-01-13.at.2.25.51.AM.mov
After
Screen.Recording.2026-01-13.at.2.19.46.AM.mov