Skip to content

[lexical-markdown] Feature: Support Enter key after ``` to create code block#8140

Merged
etrepum merged 4 commits intofacebook:mainfrom
achaljhawar:feat/code-block-with-enter-key
Feb 14, 2026
Merged

[lexical-markdown] Feature: Support Enter key after ``` to create code block#8140
etrepum merged 4 commits intofacebook:mainfrom
achaljhawar:feat/code-block-with-enter-key

Conversation

@achaljhawar
Copy link
Copy Markdown
Contributor

Description

This PR adds an Enter key listener so typing ``` and pressing Enter creates a code block.

Closes #7948

Before

Lexical.Playground.2.mp4

After

Lexical.Playground.3.mp4

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Feb 13, 2026 9:28pm
lexical-playground Ready Ready Preview, Comment Feb 13, 2026 9:28pm

Request Review

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 13, 2026
Copy link
Copy Markdown
Collaborator

@etrepum etrepum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have a test that verifies that this code doesn't run when the cursor is not at the end of the line

@etrepum etrepum added this pull request to the merge queue Feb 14, 2026
Merged via the queue into facebook:main with commit f208870 Feb 14, 2026
39 checks passed
rayterion pushed a commit to rayterion/lexical that referenced this pull request Feb 18, 2026
@etrepum etrepum mentioned this pull request Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Support starting a code block by pressing Enter after ``` in markdown plugin.

2 participants