BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Unexpected behaviour when putting "/" at the beginning of a line

Open Olifair opened this issue 9 months ago β€’ 2 comments

What’s broken?

When I have written a line of text (without having chose beforehand any formatting), and then I put the "/" at the beginning of the line I get the pop-up menu with the formatting options. when I now chose one of the formatting options, I get a new line with this format.

What did you expect to happen?

I find this confusing, I would have expected when putting the "/" at the beginning of a line, that then the whole line would be reformatted with the new format. That the format of the edited line is not changed, but a new line is created below with the format is quite unexpected to me, especially when using only my keyboard.

Steps to reproduce

  1. Create a new document or create a new line in an existing one
  2. write some text (in standard format)
  3. put "/" at the beginning of the line
  4. formatting menu opens, chose a format
  5. the line in which the "/" was put is not changed, but a new line is created below, empty but in the chosen format

BlockNote version

the actual running "docs" version

Environment

windows 11

Additional context

Don't quite know if this is a bug, an improvement or just a very personal point of view I had discussed this with @virgile-dev after having used the French "docs" web-page, and @virgile-dev had suggested to post here.

Contribution

  • [ ] I'd be interested in contributing a fix for this issue

Sponsor

  • [ ] I'm a sponsor and would appreciate if you could look into this sooner than later πŸ’–

Olifair avatar Feb 16 '26 14:02 Olifair

Here is the steps you can follow that and you can solve that issue easily because i take time i already work one more app so that's why i gave you the steps you can follow these steps you can resolve easily.

Step 1 β€” Locate Slash Command Config Step 2 β€” Override Slash Menu Step 3 β€” Convert Instead of Insert Step 4 β€” Only Convert If Text Exists Step 5 β€” Test Case

Haseeb-MernStack avatar Feb 16 '26 17:02 Haseeb-MernStack

Hi @Olifair , thanks for reaching out. I think the behavior you see is aligned with existing UX patterns in other tools. To keep things consistent, it's easier to understand that using the slash command will always insert a new block.

woutervroege avatar Feb 17 '26 09:02 woutervroege