A text editor can be a real game-changer when it’s equipped with the functionality of collaborative editing. There are so many tools out there providing such features with great excellence such as Google Docs, Microsoft word, etc.

I planned to design and develop such a system that can handle basic text editing and can scale on need. So I tried developing a POC(Proof of concept) with real-time editing feature and went through some ideas to make this solution scalable.

Obviously, there are scopes for improvement, and please share your ideas which will give better insights.

Requirement

Let’s define some project requirements to start on

  1. Basic editing
  2. Real-time collaboration
  3. Basic operational transform
  4. List of joined users
  5. Add / Remove users based on event

Tools

  1. CKEditor 4
  2. Plain JavaScript
  3. Node.js & Express
  4. Socket.io
  5. For operational transform, I’ve used the CKEditor 5 diff library to adapt changes to the editor.

#nodejs #realtime #socketio

Building A Real-time Collaborative Editor
1.70 GEEK