This is exactly what I had in mind when I started working on http://collabde.appspot.com/ I used codemirror with mobwrite and appengine channel api. It currently works only for python though.
I hadn't heard about mobwrite. It may offer a better solution than what I'm using.
Thanks for the tip.