Ymacs - An Emacs-like editor for the web
ymacs.org
ymacs.org
I too have had 'fun' with text editing in browsers. And I need to revisit it at some point. :-(
Here's an experiment of mine: http://www.fluffy.co.uk/stediting/ -- very proof of concept, only left+right keyboard navigation works so far. However, it does show that proportionally spaced text is possible with this kind of technique. Using monospaced fonts, like Ymacs does, is cheating.
I was going to do make something which would sort this out once and for all: http://code.google.com/p/editable-framework-js/ but as is the way with many an open source project, it didn't get much further than thinking about the design.
I found this linked from the Ymacs site http://marijn.haverbeke.nl/codemirror/story.html which is a nice explanation about why using designMode is a nightmare.
It was cheating, initially, but now it supports variable-width fonts as well, as you can see by selecting some other font from the menu (right-side). Of course, some serious hacks were needed. ;-)
Impressive web app. It's written with the author's own javascript library http://www.dynarchlib.com/ which is both beautiful and extensive.
I haven't actually tried that with YMacs so I don't know how well it would work. But I could see something like this forming the basis of an actual serious editor. The one thing I feel is missing from Emacs is a decent display engine. Of course that's not a new idea.
EDIT: I just fact checked my comment and it turns out that you can't just reload code into a running YMacs. If that were supported then I think it would be fair to call it an "Emacs like editor" or even just an "Emacs".
Surprisingly snappy and pleasant to use though. Does not work perfectly on Opera, but still more than I expected.
However, on my Opera10.10/Linux, '(' seems to do the same as Shift-Down, and '.' deletes. Strange...
Given the ambition of this hack, I'm not surprised that he's not rushing to make it work cross-browser...
See also "Treating user myopia" on Coding Horror. http://www.codinghorror.com/blog/archives/001306.html