mdx-editor / mdx-editor/editor

[BUG] Quote shortcode '>' only works if quotePlugin is initialized before markdownShortcutPlugin()

Open
#620 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.
  • [ 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:

  1. Open the CodeSandbox link
  2. Try to activate the quote block by typing '>' followed by a space on a new line.

Expected behavior

  1. The qoute block shortcode should work regardless of the initialization sequence of the markdownShortcutPlugin and the quotePlugin
  2. 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.