mdx-editor / mdx-editor/editor

MDXEditor onChange doesn't recognise text inside Admonitions

Open
#107 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi
I encountered problem with onChange attribute of MDXEditor. When i'm working with AdmonitionDirectiveDescriptor i doesn't get updated values during adding changes inside Admonition component (any tip, danger etc...)
I'm getting update immediately when i move focus(cursor) from inside admonition. I attached screen with console log and current markdown editor value.

It's even visible on demo site: https://mdxeditor.dev/editor/demo when you put text inside and change tab to markdown

Version of @mdxeditor/editor: 1.1.2

image

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

Reproduce the issue in the MDXEditor demo using AdmonitionDirectiveDescriptor: edit text inside an Admonition and switch to the markdown tab while observing the onChange value. Trace the editor's change propagation for nested admonition content; done means onChange reports updated markdown immediately while typing inside the admonition.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.