Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow markdownShortcutsPlugin to insert nodes on newline without pressing SPACE (or document how to) #716

Open
0x0f0f0f opened this issue Mar 4, 2025 · 1 comment

Comments

@0x0f0f0f
Copy link

0x0f0f0f commented Mar 4, 2025

I've found this discussion, but I found no later development.

#290 (comment)

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 #714 when inserting a thematic break with ---.

(PS. I'd be glad to keep in touch. Feel free to send me an email!)

@petyosi
Copy link
Contributor

petyosi commented Mar 4, 2025

To be honest, I have no idea how to do that either. That part of the markdown shortcuts implementation is quite convoluted. If you want to help, you can search or ask for direction in Lexical's discord. The team does their best to keep things organized, yet I often struggle to find information in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants