The problem
Typing --- at the start of an empty block converts it to a divider. Pressing Ctrl/Cmd+Z right after does not bring back the three dashes: the divider stays.
Steps to reproduce
- Place the cursor in an empty paragraph block.
- Type
---.
- The block becomes a divider.
- Press Ctrl+Z (Cmd+Z on macOS).
Current behavior
The divider disappears. There is no way to get back to the literal --- text with undo.
Expected behavior
The first undo reverts the automatic conversion only and leaves --- as text in the paragraph, with the cursor after the last dash. A second undo then removes the typed characters as usual.
This is what Notion does, and it matches how users treat autoformatting in most editors: undo is the escape hatch when the editor guessed wrong.
Why it matters
Someone who wants three literal dashes (a separator in plain text, a markdown snippet, a table sketch) currently has no obvious way to keep them. They have to delete the divider and find a workaround to type the characters without triggering the rule. A conversion the user did not explicitly ask for should be reversible in one keystroke.
Environment
Tested on blocknotejs.org
The problem
Typing
---at the start of an empty block converts it to a divider. Pressing Ctrl/Cmd+Z right after does not bring back the three dashes: the divider stays.Steps to reproduce
---.Current behavior
The divider disappears. There is no way to get back to the literal
---text with undo.Expected behavior
The first undo reverts the automatic conversion only and leaves
---as text in the paragraph, with the cursor after the last dash. A second undo then removes the typed characters as usual.This is what Notion does, and it matches how users treat autoformatting in most editors: undo is the escape hatch when the editor guessed wrong.
Why it matters
Someone who wants three literal dashes (a separator in plain text, a markdown snippet, a table sketch) currently has no obvious way to keep them. They have to delete the divider and find a workaround to type the characters without triggering the rule. A conversion the user did not explicitly ask for should be reversible in one keystroke.
Environment
Tested on blocknotejs.org