TryGhost/Ghost — pull request #4373 by ErisDS (2014-10-31 18:23:18+00:00)
Title: [WIP] No more CodeMirror

:boom: :fireworks: :boom: :tada: :boom:

This PR needs SIGNIFICANT cross browser and device testing - here's how to [test a PR](http://dev.ghost.org/easy-git-pr-test/)

It represents a complete reimplementation of the existing functionality we had with codemirror with a few exceptions:
- the new, simpler image upload code no longer uses markers to map between the left and right panes, and instead does a quick lookup, which should work equally well on all devices
- it may be necessary to change the image upload code to make sure that the event which re-enables the textarea is fired after the processing is complete, rather than after the image upload is complete (this is a maybe TODO)
- now that we don't have awkward markers to keep track of, the image upload regex can be updated in both the `ghostimagepreview.js` and `image-manager.js` to be a much more powerful regex which properly supports [image titles](https://github.com/TryGhost/Ghost/issues/985) (this is a TODO)
- the shortcodes have been reimplemented to be slightly smarter about where the cursor goes after, and whether or not they require a newline (more to be done here to make the list shortcut better) the link and image shortcuts still need updating to make the cursor use a selection (this is a TODO)
- the textarea does not capture TAB. This can be added, but I'm not 100% whether it's a blessing or a curse - so lets do some testing without before adding it (this is a maybe TODO)

closes #4368

- Drop CodeMirror in favour of a plain text area
- Use rangyinputs to handle selections cross-browser
- Create an API for interacting with the textarea
- Replace marker manager with a much simpler image manager
- Reimplement shortcuts, including some bug fixes
- Rename components include editor-route-base