Google Wave first produced most of Google's documents, although the models are completely different. Begin research there, as there is much to learn.
If you are just trying to do something simpler than structured documents, you may need mobwrite, etherpad, or one of its forks.
An editor can be complex and essentially involves creating an entire word processor in javascript. Here are some examples of this.
With any editor, you have a line or element buffer that you should mirror in real time with the api of your choice.
This can be done using the real-time API for Google Drive .
Modification events should be handled in both directions. Changes to the local model apply to the real-time model and vice versa. Modifications to the local model may be displayed as they arise.
Cursors can be processed using pointers on the source buffer, such as Index Reference .
A server can be implemented in several ways, but this will require an operational transformation model that supports common structures. The Wave protocol site has an example using the xml model.
12345 Mar 08 '12 at 21:25 2012-03-08 21:25
source share