Hash character with the suggestion utility conflicts with heading Markdown shortcut
See original GitHub issueWhat’s the bug you are facing?
When using the #
as the char
in the Suggestion utility, this conflicts with the heading Markdown shortcut IF it’s the first character in an empty paragraph. Instead of adding the selected suggestion, the paragraph is converted to a heading instead.
How can we reproduce the bug on our side?
- Take the CodeSandbox as an example
- Type
#
into the editor as the first character in an empty paragraph - Press <kbd>Enter</kbd> to select an item from the dropdown
- Observe that the empty paragraph is converted into a heading
Can you provide a CodeSandbox?
What did you expect to happen?
The selected suggestion from the dropdown should’ve been added to the editor.
Anything to add? (optional)
A few observations:
- I understand that I can disable the heading input rule to work around this issue, but we’re looking for a way to have both things working.
- After some research I’ve noticed that all input rules take priority over anything else (i.e. the input rules
handleKeyDown
will take precedence over other extensions/pluginshandleKeyDown
event handlers, that’s why we have the behavior here described. - Possible solution: We need a way to sort ProseMirror plugins based on a
priority
property (similar to what we have for extensions) so that we can have certain plugins being handled before the input rules plugin.
Did you update your dependencies?
- Yes, I’ve updated my dependencies to use the latest version of all packages.
Are you sponsoring us?
- Yes, I’m a sponsor. 💖 (on behalf of Doist)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:16 (8 by maintainers)
Top Results From Across the Web
GitLab Flavored Markdown (GLFM)
headers, linkable Header IDs. images, embedded videos and audio. line breaks, more line break control. links, automatically linking URLs ...
Read more >How to escape the (hash) # sign in a GitHub markdown ...
I have the following code on a README.md file on GitHub, where I am trying to display the hash sign on a header...
Read more >Writing R Extensions - The Comprehensive R Archive Network
The utility R CMD build may add files in a build directory (but this should not be used ... Some package listings may...
Read more >Release Notes - Drafts User Guide
You can also always get highlights of the latest additions in the app via “What's New” (Settings on iOS, Help menu on Mac)....
Read more >JupyterLab Changelog — JupyterLab 3.6.0b0 documentation
fix run cells breaking on non-header markdown cells #12027 (@andrewfulton9) ... Add additional Accel Enter keyboard shortcuts for the notebook:run-cell ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t think it does because the problem here lies in the ProseMirror plugins priority, and not the Tiptap extensions priority (which are 2 different things). As I’ve suggested in the OP, I think we need a way to override the priority for ProseMirror plugins, akin to the Extensions
priority
field.This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days