Skip to content

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

Closed

Description

@LvChengbin

Description

Currently, Lexical only recognizes a code block when a space follows “```”, but most Markdown editors allow pressing Enter instead.

Activity

  1. added
    enhancement
    on Oct 26, 2025
  2. etrepum commented on Oct 26, 2025

    @etrepum
    Collaborator

    I don't think you can really do this with the current architecture of markdown shortcuts, but you could write your own KEY_ENTER_COMMAND command listener that does this

  3. LvChengbin commented on Oct 28, 2025

    @LvChengbin
    Author

    @etrepum Yes, that's the reason I posted this issue.

  4. etrepum commented on Nov 2, 2025

    @etrepum
    Collaborator

    My point is merely that this would be easier to do in a separate plugin, rather than adding it to the existing markdown shortcuts plugin, because the plugin would need a different architecture to support this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementmarkdown

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions