mdx-editor / mdx-editor/editor
[BUG] maxLengthPlugin can not handle unicode telex.
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 307
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 5
Description
Hi @petyosi
- 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
I have used maxLengthPlugin to handle the max length of markdown. It works fine but if I use unicode telex(Vietnamese, Korean ....) it can't handle it properly.
My code
<MDXEditor
markdown={''}
plugins={[
maxLengthPlugin(10),
]}
/>
https://github.com/user-attachments/assets/d1cef3df-7263-42f4-a793-76e6abb5a376
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in MDXEditor with maxLengthPlugin(10), comparing ordinary text with Unicode telex input such as Vietnamese or Korean. Trace the plugin's length handling and verify that the configured maximum behaves correctly for these inputs without regressing ordinary text.
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
- 38/100