Use single contenteditable div to highlight

- Removed separate text area and two-mode switch
- Added code to make sure cursor remains in the same place after doing
text replacement.
Merge branch 'editor' into gh-pages