Originally Posted by rnd me
fun fact: in chrome, those linebreaks in textContent might come back if you first set the container's white-wpace to "pre" or "pre-wrap" or "pre-line". Surprisingly, this affects textareas as well; a fact which burned me for years before i figured out what was going on.
Who would have thought that it could be such a hassle to provide word breaking between words?
I've spent a few hours trying to tidy the presentation, and progress has been made.
This is a good reference on the points you mention (and everything):
The only problem is going to be compatibility.
I'm testing between Firefox and chrome at the mo, cos I can't be bothered to boot into windows.
Each handles pre differently in HTML but perhaps in css they may be more unified.