OscarGodson/EpicEditor — pull request #166 by hongymagic (2012-07-29 12:48:48+00:00)
Title: Enter key now inserts `\n` instead of leaving it for browsers to handle them

This change is in preparation for issue #159. I think this code is ready for review. Coincidentally, this fixes: #162 and #164.

You can see the initial implementation of #159 (TAB/indentation support) on [my fork branch](https://github.com/hongymagic/EpicEditor/tree/feature/indentation). It was branched off this pull request.

---

Things to look out for:

1. Public API (there are 3 new public API calls)
2. Event handling
3. Specs/Tests… I wasn't sure how to write tests for `insertText`. You can see I've exposed `_getText` as public `getText`. Please review this!

---

There is an issue with Firefox at the moment, whilst the `insertText` works when run, the tests I wrote fail in Firefox. Perhaps I'm doing the specs wrong. If you could help me polish the tests, that would be super helpful.

I have tested this code in Chrome, Firefox, Safari, and IE9.