How to delete HorizontalRule on backspace? #5925
Replies: 1 comment
-
First, let me clarify that this is not a bug. When there's only one
This is because you never selected the only remaining By default, Tiptap provides an 2025-01-02.12.00.21.movThe solution is quite simple: increase the height of the 2025-01-02.14.07.53.movFrom a deeper perspective, this is an issue of interaction friendliness. Simply increasing the height of the You could try optimizing your editor’s interaction design. For example:
|
Beta Was this translation helpful? Give feedback.
-
See https://tiptap.dev/docs/examples/basics/default-text-editor
If you delete all the contents of the editor (ctrl-a backspace for example), then use the
Horizontal rule
button to insert a horizontal rule, then press backspace, the paragraph where your cursor was gets deleted, but the horizontal rule remains.Now click out of the editor.
Now try to continue editing.
No matter what you do, you cannot get a cursor inside of the editor again.
Because the only contents of the editor are a
contenteditable="false"
horizontal rule.I think there are two ways to solve this problem:
<hr>
Can anyone help me to solve this problem for the HorizontalRule?
Beta Was this translation helpful? Give feedback.
All reactions