BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

/ menu not working after a colon

Open rouja opened this issue 9 months ago • 2 comments

If a sentence ends with ':', the '/' menu stops working.

Image

rouja avatar Feb 28 '25 16:02 rouja

Thanks, was able to reproduce this

YousefED avatar Mar 03 '25 11:03 YousefED

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.

brennancheung avatar Mar 20 '25 05:03 brennancheung

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

nperez0111 avatar Apr 07 '25 08:04 nperez0111