mdx-editor / mdx-editor/editor

No way to get to next line when doing ```[language] shortcut for codeblocks

Open
#397 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
3.7k
Forks
307
Avg merge
14h 22m
Merged PRs (30d)
5

Description

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • I have read the documentation and cannot find an answer.

Describe the bug
Testing in https://mdxeditor.dev/editor/demo go to the bottom of the page and write ```js followed by space. Now try to get to the next line to write in. (I would expect this to work with shift+enter or just clicking below it).

When using the code block button in the navbar it will add a newline below the codeblock to continue writing in.

Reproduction
Testing in https://mdxeditor.dev/editor/demo go to the bottom of the page and write ```js followed by space

To Reproduce
Steps to reproduce the behavior:

  1. https://mdxeditor.dev/editor/demo
  2. Click on the last editable part of the markdown editor
  3. write ```js followed by enter
  4. try to write after the codeblock

Expected behavior
Should be able to continue after writing a codeblock

Desktop (please complete the following information):

  • OS: MacOs
  • Chrome

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the MDXEditor demo entry point and reproduce the issue in Chrome on macOS by entering ```js at the bottom editable area and pressing Enter. Confirm that the code block shortcut leaves a usable place to continue editing after the block, matching the navbar code-block behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.