CKEditor v4 is FREE and Open-Source Rich Text Editor. It is used by many big organisations and also it is default Text Editor in Drupal 8
Some of the great features of CKEditor are as follow:-
- Paste content from Word and Excel
- It is a WYSIWYG editor
- Various styling and formatting plugins
- Allow us to ad media
and many more ...
How to add Collaborative Editing feature in Drupal 8's default Text Editor?
As per my research following are the ways to add Real-Time Collaborative Editing feature in Drupal 8's default Text Editor:-
Upgrading CKEditor 4 to CKEditor 5
CKEditor 5 brings exciting new features which include Real-Time Collaborative Editing with Live Chat and also allow comment on text (like Google Docs). But its Collaborative Editing features is paid (beside 30 days free trial). Also As per #2966864 the maintainer of CKEditor core module for Drupal will add CKEditor 5 in Drupal 9.
Through Drupal Plugins
Drupal's Plugin API allows us to extend functionality of any existing feature of Drupal. Drupal have Plugin for CKEditor but they are limited to include CKEditor's plugins in Drupal.
Source is the following doc comments:-
This base class assumes that your plugin has buttons that you want to be enabled through the toolbar builder UI
Defines an interface for CKEditor plugins with buttons
This allows a CKEditor plugin to define a settings form
Contextually enabled CKEditor plugins
~ in simple words enabling a CKEditor Plugin as dependency of other CKEditor plugin
This allows a CKEditor plugin to add additional CSS in iframe CKEditor instances
Through CKEditor's plugin
CKEditor allow us to add more features in it using its Plugin. But our aim is to add Real-Time Collaborative Editor functionality for Drupal only. So if there is some better way then we should choose it
Through Pusher or Firebase
Pusher and Firebase are the service which allow us to easily integrate Real-Time functionality. But they are free upto limited extenct hence it is not much suitabl way to add Real-Time Collaborative Text Editor functionality in default Text Editor of Drupal 8.
Through 3rd party Text Editor as mediator
For this I tried to find Real-Time Collaborative Text Editors and concluded with Etherpad and FirePad. But FirePad uses firebase as database hence I rejected it
Etherpad is an Open Source Real-Timwe Collaborative Text Editor. I have a plan that once any user keypress event occurs to any user the boolen value in database sets to false stating that no other person is allowed to type and using Etherpad as mediator only the content gets updated in other user's side. And after 2-3 second of no key press the bollean value in database changes to true stating that other users can edit the content.
To find out better way I have opened a Post in Etherpad's official Mailing List (Google Group). You can find it here.