Implementing a generic real time collaborative editor/plugin (Like Google Docs)

2.4k views Asked by At

So, I'm looking at implementing a real time collaborative editor, as some of the pre made ones (such as etherpad) lack the features of a dedicated editor.

I currently use CKEditor, but am looking to switch to Aloha Editor.

I am going to be using Pusher for push notifications / update to places around my app so that everything can be as real time as possible as multiple people use the software.

Now, initially my thought process on how to implement a collaborative editor seems really slow -- To constantly swap out entire text fields using pusher... but moving giant blocks of text around would get terribly ugly fast, and I'm not really sure what to do when there are multiple ( > 5 ) people working on text at the same time.. So... there MUST be an easier, more network efficient way to go about doing collaborative editing.

Ideas?

2

There are 2 answers

8
Inshallah On BEST ANSWER

A real time collaboration plugin for the Aloha-Editor called Aloha-Wikdiocs was released at the jQuery conference 2012. It's still alpha but already works quite well.

It's not open source. The real-time collaboration is provided as a service that can be integrated with existing systems. Currently there is no fee for this service.

There is a demo and some documentation on how to integrate the service on the website.

5
Sergio Tulentsev On

Group changes together and calculate smart deltas.

For example, a user presses keys 'h', 'e', 'l', 'l', 'o'. Your javascript groups them and reports to the server: "User A inserted text 'hello' at position X".

You get the idea.