TryGhost/Ghost — pull request #2895 by appleYaks (2014-06-06 06:31:47+00:00)
Title: [WIP] Reach Editor parity with Ember

This seems to work pretty well, but needs testing.

There is some code from issues #2886 and #2892 I had to put in here to make this work right. I'll remove it and rebase once those PRs are merged so the original authors get credit.

**Some issues:**

* Something is hijacking the first click into CodeMirror so that `document.activeElement` is the body, even though the cursor is active. Not sure where that's coming from. A second click into CodeMirror works.

* Right now the way the markdown and preview components' views communicate is through the parent `EditorView`. This feels pretty hacky to me, but there's only so much that can be done without a dedicated EditorController.

I also need to add a bunch of documentation, but I'll get to that soon. For now I'd appreciate if you guys could test this and let me know if it works the way it should, and what I should change or make more clear. I'm sure more work needs to be done before this is merged.