Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor almost unusable after replacing everything with a horizontal line #1081

Closed
mariohamann opened this issue Apr 5, 2021 · 3 comments
Closed

Comments

@mariohamann
Copy link

What happens?

I selected the editor's content and replaced it with a horizontal rule. The "text-cursor" disappeared, I couldn't write anything and therefore the editor wasn't usable anymore. (CMD-Z helped – and the cursors of other users in collaboration mode...)

How can others reproduce the issue?

  1. Go to next.tiptap.dev
  2. Replace the whole content with a horizontal rule

CleanShot 2021-04-05 at 09 59 37

@philippkuehn
Copy link
Contributor

Hey,

it’s a horizontal rule (hr), not a line break. but you are right. there are some strange behaviors for block nodes without text content in ProseMirror.

tip: you can always create a node selection with cmd+click. you can see an added class to that DOM element. after that you can press backspace to remove that selected node. but that’s not obvious.

what would you expect in such a case?

@mariohamann mariohamann changed the title Editor barely unusable after replacing everything with a line break Editor barely unusable after replacing everything with a horizontal line Apr 5, 2021
@mariohamann
Copy link
Author

Chrm. Don't know why I've written "line break". 😂

Hm. Good question. I will think about it and will have a look in other editors.

@mariohamann
Copy link
Author

I had a look in TinyMCE and it matches my thoughts: The easiest and in my opinion most intuitive way is to add a paragraph after every hr, as shown in the following GIF:

CleanShot 2021-04-06 at 09 50 18

This allows to go on with writing or to delete the line with backspace.

@mariohamann mariohamann changed the title Editor barely unusable after replacing everything with a horizontal line Editor almost unusable after replacing everything with a horizontal line Apr 6, 2021
@hanspagel hanspagel transferred this issue from ueberdosis/tiptap-next Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants