BlockNote
BlockNote copied to clipboard
/ menu not working after a colon
If a sentence ends with ':', the '/' menu stops working.
Thanks, was able to reproduce this
Seems like an issue with SuggestionMenuController not just the slash menu itself.
You can reproduce it on the docs website directly https://www.blocknotejs.org/docs/ui-components/suggestion-menus
Scroll down to the mentions example and type something like breaks after colon: @. Funny thing is that if you move the cursor before the : it still works fine.
This is because : is the trigger character for the emoji menu, and / is the trigger character for the slash menu.
So it sees :/ as not being an emoji, when it maybe should switch the menu type.
Would likely require updating this function: https://github.com/TypeCellOS/BlockNote/blob/3e52fde8d62e7b934079a1dfce170337b8f9e776/packages/core/src/extensions/SuggestionMenu/SuggestionPlugin.ts#L198