guardian / scribe

DEPRECATED: A rich text editor framework for the web platform
http://guardian.github.io/scribe/
Apache License 2.0
3.5k stars 245 forks source link

Fixes #489 #490

Closed danburzo closed 7 years ago

danburzo commented 8 years ago

This pull request fixes some issues identified in #489 for inline-mode:

Pressing Enter while having a selection originally did not delete the range contents. It now does.

Pressing Enter in the middle of a word would insert two <br> elements between the parts. I've changed the hasContent method such that it takes into consideration text nodes that have non-whitespace content. (created a new nodeHelpers method + related tests).

I've also added a raw-inline.html example for fiddling with inline-mode Scribe.

danburzo commented 8 years ago

I've also included a sanity check for scribe.el.lastChild. Scribe assumes the element always has some child, but there are situations when the element gets completely empty. Pressing Enter in these situations will throw an error.

rrees commented 7 years ago

Looks good 👍

codeclown commented 7 years ago

Just noticed this too. When would this be available in the release?