Collaborative Edition

I started using EssentialJS for my company because we need to find a powerful Document Editor for our application. I am currently madding a POC in order to choose between this and CKEditor.

 

We use Angular and I success to integrate the Angular Component Editor but I can’t find a complete example for collaborative editing. 

 

What did I need to track changes between many connected Users ?

 

I need to :

  • For a connected User , track change of other users for the same document 
  • Manage validations (a User cannot validate his own changes)
  • Have comments 

 

What did I need in my backend ? An Object that represents my content and a websocket with the changes in content, comments etc ? Or the changes will be get on the refresh of the page ?

 

 How is the complete form of the JSON object that represent the Editor  content ?  What are the properties to get comments and track changes for my back.

 

 Can I have an example to achieve this please ? I cannot see a concrete example anywhere.


Thanks 

 


5 Replies

HC Harini Chellappa Syncfusion Team August 18, 2020 11:31 AM UTC

Hi Itjoko, 

Syncfusion Greetings! 

Currently, collaborative editing is not supported in document editor. We have already logged it as feature request and planned to consider this feature in 2020 Vol 3 release. You can track the status from the below link.  


Reg. For a connected User , track change of other users for the same document  

You can set other users as current user with the help of currentUser property of document editor module. 

Document editor provides currentUser property of editor module to set as current user in document editor.  

 containerInstance.documentEditor.currentUser = “[email protected]” 
 
Kindly check the below stack blitz sample to set different users as current user. 


Reg. Manage validations (a User cannot validate his own changes) 

Can you please share the requirement on this in detail? 

Reg. comments 

Document editor provides support to add comments in the name of current user. 


What did I need in my backend ? An Object that represents my content and a websocket with the changes in content, comments etc ? Or the changes will be get on the refresh of the page ? 

Document editor provides option to export the document editor content in backend. You can either pass the blob or SFDT to server-side and save the document. 




 How is the complete form of the JSON object that represent the Editor  content ?  What are the properties to get comments and track changes for my back. 

Document editor content will be in SFDT structure.  

if you want to get the details of track changes. You can get it from revisions property of document editor module. 

containerInstance.documentEditor.revisions 
 
Kindly refer the below documentation, which in Javascript platform. 


Currently we don’t have any API to retrieve the comments. Can you please share on how you need the details on comments in a document? 
 
Regards, 

Harini C 



II Itjoko Inès August 18, 2020 01:41 PM UTC

Hello, 

Thanks for your great answer.

For this need :
Reg. Manage validations (a User cannot validate his own changes) 

If user X made a change on a document and his changes are tracked. I don't want X to be able to accept or reject his own changes.

Is there an event before the change is accept or reject to verify if the current user is the author of the change ? 

I need a user to not be able to manage (edit or delete) comments of other users. Is there a way with an event or something else to do that ?

For this other need :
Currently we don’t have any API to retrieve the comments. 

I want to get all comments to be able to show them in another panel of my application. Is there a way to do it easily ? 

Other Need :

Can I manage Rights easily ? (Set if a user has the right to only read , writing, comment ... ) . There is example for that ?

Thanks for your help




HC Harini Chellappa Syncfusion Team August 19, 2020 04:31 PM UTC

Hi Itjoko, 

Reg. event call on accept/reject buttons 
 
Currently document editor doesn’t provide such event. We are validating on this. Will update further details on or before Aug 24th, 2020. 

Reg. Comments 
 
Currently, document editor doesn’t provide API to retrieve comments. 

We have already logged a feature request. Feature will be included in our 2020 Vol 3 release which is expected to be available at the end of September 2020. Will update the status of the feedback link once it is taken for implementation. You can track the status of this feature from below feedback link. 


Can I manage Rights easily ? (Set if a user has the right to only read , writing, comment ... ) . There is example for that ? 
 
You can restrict writing by setting below restrictEditing property to true/false based on current user property in selection change event. 

container.selectionChange = ()=>{ 
      if(container.documentEditor.currentUser === "[email protected]"){ 
        container.restrictEditing = true; 
      } else { 
        container.restrictEditing = false; 
      } 
    }; 
 
 
Please refer the below stack blitz sample for your reference. 


kindly check it and let us know if any concerns. 

Regards, 

Harini C 

, 
 



AM Adrian Mapacpac December 5, 2024 04:25 PM UTC

Hi I'm trying to make a collaborative editing for PDFViewer, I did try to leverage it using websocket but looks like it is not updating properly for all client.


it would be better if you have some example or some documentation on how to achieve it



DS Dhanush Sekar Syncfusion Team December 9, 2024 12:40 PM UTC

Hi Adrian,


Currently, there is no support for collaborating feature in PDF Viewer. We have already logged this as a feature request as "Support for Collaborative editing in PDF Viewer". We will implement this feature in any of our upcoming releases due to the various features and improvements are planned in our roadmap and let you know once this feature is implemented. You can track the status using the below feedback link.

Feedback link: Support for Collaborative editing in PDF Viewer in JavaScript | Feedback Portal


Regards,

Dhanush S


Loader.
Up arrow icon