-
Notifications
You must be signed in to change notification settings - Fork 25
Shift enter at end of text adds data tag to the added <br> tag #172
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
Conversation
5768dc9 to
374e008
Compare
|
Let's take it in before the major bump with jquery, hoping looking a bit more into the tests later on |
|
🎉 This PR is included in version 1.8.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
I think I just found the original cause for this issue. It's not the enter which caused issues but the But as we strip the null escape character away, this doesn't cause any side effect anymore. Before the fixes in the other PRs. Right after a focus and typing text. Without ever entering return. |

Issue
Undeletable / visible
<br>tags at the end of an element.Description
We're fighting against default browser behavior here as adding a break-tag with shift+enter at the end of a text, will automatically create two break-tags, with one being un-deletable.
Related issue that tinymc has (They have a WYSIWYG-editor): tinymce/tinymce#4856
My suggestion is to just intervene and disallow/remove break-tags at the end of a text. This is more transparent due to the visual feedback, vs hidden
<br>tags in the document.Furthermore, mark all other break-tags (
<br data-editable="newline">), because this solution has some tradeoffs as well.Changelog
<br data-editable="remove">instead of<br><br data-editable="newline">Tradeoffs
-> Those would be manually filterable
<br data-editable="newline">scanning for that.