-
Notifications
You must be signed in to change notification settings - Fork 6
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
Issues with forceLineBreaks mode #16
Comments
This sort of thing always needs to include which browser. That's gotta be chrome, right? Did you manage to enter that HTML from the keyboard? If so, what were the keystrokes? With forceLineBreaks, there should be no If not, then we need to figure out whether it's reasonable for us to try to handle any external input perfectly. I'm tempted to declare that input has to be valid p-wrapped or br-delimited ahead of time or we're not responsible for it. |
Yep chrome. |
My point being, I'm pretty sure I've got something that can behave well with HTML that it generates from the current version of itself. Dealing with browser-specific issues is such a pain that e.g. GitHub doesn't use contenteditable. So we have to draw the line somewhere I think. The question is where. |
Other bad issue related to
|
Okay that I haven't played with. I'll give it a look ASAP. (By the way I'm likely to be out of touch for a few days; apologies for the delay!) |
So here's where we're at with these. The editor does a good job with input that it has generated – carefully – but it's not equipped to deal with arbitrary markup coming in from externally, including common markup from earlier versions of WYSIWYG (e.g. the As you found, forceLineBreaks mode is currently super buggy when used with the block-level formatters (e.g. Line-breaks mode also doesn't currently support the text-align buttons very well. Text-align requires a block-level element, and line-breaks mode is explicitly trying to avoid block-level elements. It's about the same level of challenge as the header elements; we need to make sure that we're making changes to the correct element, and certain commands (e.g. return-to-default-alignment) need to result in removing the block-level element rather than changing it. By the way, any block-level element in line-breaks mode is going to run into the hit-enter-twice issue. Given all this, I'm going to mark forceLineBreaks mode as experimental for now, and work on these issues as we go. Any bugs with non-linebreaks mode should take higher priority and should get their own Issues. |
To reproduce the issue, set
forceLineBreaks
to true and add this HTML:If you put the cursor at the end of the paragraph, enter must be press twice to add a line break.
The text was updated successfully, but these errors were encountered: