mdx-editor / mdx-editor/editor
[BUG] Quote shortcode '>' only works if quotePlugin is initialized before markdownShortcutPlugin()
Nobody has claimed this yet.
- 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.
- [ x I have read the documentation and cannot find an answer.
Describe the bug
If the quotePlugin() is initialized after the markdownShortcutPlugin(), the quote shortcode > does not work. If the quotePlugin() is initialized before the markdownShortcutPlugin() it does work.
Reproduction
Link to CodeSandbox
To Reproduce
Steps to reproduce the behavior:
- Open the CodeSandbox link
- Try to activate the quote block by typing '>' followed by a space on a new line.
Expected behavior
- The qoute block shortcode should work regardless of the initialization sequence of the markdownShortcutPlugin and the quotePlugin
- or an error should be thrown, informing the user of the correct order of initialization.
Desktop (please complete the following information):
- OS: tested on Windows
- Browser: Chrome
Additional context
Thank you for the great work on this editor!
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 from the linked CodeSandbox and trace the interaction between quotePlugin() and markdownShortcutPlugin(). Verify the initialization-order behavior, then make the quote block shortcode work in either order or confirm that an explicit initialization error is required.
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
- 42/100