Probably because you inject (no breaking spaces) instead of regular word spaces — so lines can’t be wrapped.
Also, the editor does not accept accented letters (Ä Ö Ü ä ö ü etc.), no Greek (Δεν Έλληνες), in short no Unicode, and not even full ASCII (common punctuation marks like — –).
It seems the app is listening to keys and basically re-implementing the whole typing input — which means you’d be in for some very heavy very low-level stuff (support for all of the 128k Unicode codepoints)…
I guess you’d had to do such a workaround to wrap the lines yourself, and move them up steps-wise, one line at a time (instead of the native scrolling behaviour). Though I really like the typewriter effect, one could ask if that isn’t at a very big expense (both in implementation effort and multi-language support).
The idea of the app (and it’s adequate name) is nice, though: stripping down even the most basic editing features (cursor moves) effectively forces one to focus on the writing at hand. Love it.
Google Docs works now — you pinpointed the problem exactly.
It was a huge pain to recreate a textarea, but worthwhile in that I could finely tune the editing experience. I started out with a textarea, but as I tried to disable certain parts, it just became very apparent that I couldn't hack it to death. Better to start over and fake it. It was very interesting learning about the logic behind word-wrap!