(This is the second incarnation because I only previewed, and didn't post ...)
The next incarnation of Zaphod is progressing nicely. The move away from complicated actions ("insert character", "insert line", "split line", ...) towards a simplified one-action style of triples (offset, old_text, new_text) has greatly improved the maintainability of the code, as the handling on the Javascript side of things has become much simpler. I also had to move away from the line based approach to a document to a buffer based approach where the whole document is stored as one string, but that made even more specialized functions like split_line and join_line obsolete.
I've added session management to the server, so there is now the possibility to edit more than one document. Adding sessions also meant adding more cruft, like a page to see all active sessions, adding an API call to set the session's name and adding Javascript to modify the session's name. Another step was to enforce utf8 everywhere on input and output - at least now, umlauts work. Input methods for Chinese or Cuneiform are to be determined. Pasting a document also works now, by displaying a textarea entry and polling it for changes while the user pastes the new document into it.
Publishing the second incarnation is currently blocked by one feature I want to add, "bookmarks", that is, marked positions within the document between which the user(s) can jump around. Bookmarks are the stepping stone for a lot of interesting features and bugfixes:
After the second public release, I have to look at existing and externally maintained Javascript libraries to manipulate the DOM UI to clean up some of the cruft that has accumulated on the Javascript side of things. Another, unrelated step is the support of Perlbal - currently, the server runs under HTTP::Server::Simple, in a non-forking fashion, but as each client hits the server at least once per second, this will not scale properly. The Perlbal infrastructure might come in handy here, as there are no CPU-intensive tasks that could block the server.
I hope I find the time during the weekend to publish the second incarnation. The source code release and/or svn repository are also on my list, but a bit lower on priority.