Such a thing is possible using APE. Doesn't exist already I guess, not
with example code at least.
I'd say that every document should have a channel, which users can
enter.
When somebody changes something to the document, the changes will be
send to the server and the server will send it to the client on that
channel.
Also, the file should be saved somehow when somebody changes anything
so that you can see the changes when you refresh.
Can't really help you with example code like I said, but studying the
examples in
ape-project.org can really help you.
Martin