mdx-editor / mdx-editor/editor

[BUG] Can't insert text between two tables

Open
#741 4 comments 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
Since tables don't get a cursor at the end of the editor (unlike the image editor for example), there is no way to insert text between two tables if they are right next to each other.

On that same note, is there a way to add a cursor at the end of a custom jsx component?

To Reproduce
Steps to reproduce the behavior:

  1. Open the Live demo.
  2. Delete all the prefilled content.
  3. Insert a table
  4. Insert another table
  5. Remove the paragraphs below and around them, so that the only content in the editor are the two tables.
  6. Try to place the cursor between them or try to place it at the start of the editor.

Expected behavior
I see two options:

  • either a cursor is needed after each table (kind of like in the image editor)
  • or clicking below or above a table should insert a paragraph before/after it.

Screenshots

https://github.com/user-attachments/assets/c7e95193-8f9e-4e1f-8058-5b1d4129e95e

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome

Additional context
Add any other context about the problem here.

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 with the Live demo and reproduce the issue using two adjacent tables with surrounding paragraphs removed. Inspect how the editor handles cursor placement at the start of the document and between tables. Done means users can place the cursor or create an insertion point between adjacent tables and at the editor boundaries.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.