editor.js
editor.js copied to clipboard
I cannot use backspace to remove whitespace character at the start of a block
Steps to reproduce:
- Use API to insert a block, which starts with a whitespace - space or tab (\t).
- Focus right after the whitespace and try to remove it by using Backspace - you can't
Expected behavior: You should be able to remove the whitespace, just like it works for letters, numbers, special characters...
Device, Browser, OS: Chrome 118, Windows
Editor.js version: 2.28.2
Plugins you use with their versions: No plugins are used
Hello, I started using editor.js a couple of weeks ago and here's a problem I've recently stumbled upon: when you create a paragraph block, which starts with a whitespace, you cannot remove the whitespace with Backspace button. Here's a reproduction: https://codesandbox.io/s/quizzical-hooks-4nctln?file=/index.html
As you can see, I create a paragraph block with blocks.insert("paragraph", { text: "\tabc" });
and then I can't remove the tab at the beginning of the string with Backspace. I can remove it with the Delete key, but I want Backspace to work as well. Is this a known issue?