mdx-editor / mdx-editor/editor
Allow `markdownShortcutsPlugin` to insert nodes on newline without pressing SPACE (or document how to)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 307
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 5
Description
I've found this discussion, but I found no later development.
https://github.com/mdx-editor/editor/issues/290#issuecomment-2451184375
It could be a simple flag: markdownShortcutsPlugin({insertNodesOnEnter: true}).
I tried implementing it myself by copying the plugin, but with no success, as I don't know why lexical is not picking the regexp up correctly for markdown transformers when pressing Enter, but still requires a space to be inserted.
An example can be seen in https://github.com/mdx-editor/editor/pull/714 when inserting a thematic break with ---.
(PS. I'd be glad to keep in touch. Feel free to send me an email!)
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
Review markdownShortcutsPlugin and the behavior described in PR 714, focusing on the thematic-break example and Lexical's markdown transformer handling on Enter. Done means the plugin either supports an explicit insertNodesOnEnter option or documents a working way to insert nodes on newline without SPACE, with the stated example working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, react, typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100