mdx-editor / mdx-editor/editor

[BUG] The maxLength and diffSource plugins don’t work well together.

Open
#757 0 comments 0 reactions 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
You can bypass the maxLength character limit when you're in source mode.

To Reproduce
Steps to reproduce the behavior:

  1. Create the Editor with those plugins.
  2. Click on Source-mode button
  3. Type until you exceed the limit defined in the plugin.
  4. See error

Expected behavior
I expected the limit is consistent across all modes.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. MacOS, Windows] - Windows can act funny sometimes.
  • Browser [e.g. Chrome, Safari]

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 by locating the maxLength and diffSource plugin implementations and reproduce the issue by switching to source mode and exceeding the configured limit. Done means the character limit is enforced consistently in both modes, with coverage for their combined use.

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.