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

Strange handling of several consecutive line breaks (<br><br>) #1379

Open
abvas opened this issue Apr 17, 2024 · 0 comments
Open

Strange handling of several consecutive line breaks (<br><br>) #1379

abvas opened this issue Apr 17, 2024 · 0 comments

Comments

@abvas
Copy link

abvas commented Apr 17, 2024

Describe the bug
The editor formats the inserted HTML very strangely if it uses more than one <br> character in a row
For some reason, the editor leaves only one <br> character out of several in a row.

To Reproduce

  1. Go to http://suneditor.com/sample/index.html
  2. Using "Code View" insert UTML:
<div>
Header <br><br>
Line 1<br><br>
Line 2<br><br>
Line 3 <br><br><br>
Footer</div>
  1. Return to editor mode.
  2. Insert the cursor, for example, between Line 1 and Line 2
  3. Press "Enter" key
  4. Press the "Enter" key again

After point 5. the cursor will jump to the very beginning of the text to the line "Header"
After point 6. spaces between lines will be removed, but an empty line will be added at the very top of the text.

In "Code View" we will see this HTML:

<div><br>
</div>

<div>Header <br>
Line 1<br>
Line 2<br>
Line 3 <br>
Footer</div>

Expected behavior
After pressing the "Enter" key twice in a row, two empty lines should be added.

Screenshots
It should be like this:
2

But it turns out like this:
1

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser chrome
  • Version 123.0.6312.123
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

1 participant