- Home
- Forum
- Angular - EJ 2
- Collaborative Editing
Collaborative Editing
Hi Christian,
When you edit a document in collaborative mode, the document editor does not send the entire Sfdt. It only transmits the data related to the specific edit actions.
Please feel free to reach out if you require any further assistance.
Regards,
Dhanush Sekar
Hi Christian,
When you edit a document in collaborative mode, the document editor does not send the entire Sfdt. It only transmits the data related to the specific edit actions.
Please feel free to reach out if you require any further assistance.
Regards,
Dhanush Sekar
Hi Dhanush,
This is the follow-up with Christian's query
We are using SyncFusion Document for collaborative editing.
I followed your code implemented on the server side for ASP .NET, where once the threshold is reached a document is being created.
- How is it getting the full sfdt to save in the document?
- Also if it transmits the data related to specific edits everytime, how are we saving the complete data into the document? (Ex: if userA types "H" and userB types "i", then how are we transcripting the word "Hi"(complete word or sentence) on the word document.
- How does the server side know the formattings applied over a particular word/sentence if the data is not received in the sfdt format.
Christian,
In collaborative editing, each specific action is transmitted to the server whenever it is performed. On the server side, we have implemented an auto-save feature. There is a threshold(reference) on the server side that determines when to save these operations to the document. Once this threshold is reached, the operations are removed from the cache and saved to the original document(reference). This describes the workflow of collaborative editing in the document editor. Please refer the below documentation for more details on Collaborative editing.
Documentation - https://ej2.syncfusion.com/aspnetcore/documentation/document-editor/collaborative-editing/using-redis-cache-asp-net
Hi Team,
These are some more queries we had wrt to collaborative editing
- How are you handling the conflicts wrt to versions while multiple users are editing the document
- Also how are you overwriting the existing document on reaching the threshold(I mean what happens to the data that is already present on the document prior to the collab editing)?.
-
Initially the file was not creating
Error in this line
Stream stream1 = System.IO.File.Open(currentDirectory + "\\" + fileName, FileMode.Open, FileAccess.ReadWrite);
then I made changes in FileMode
Stream stream1 = System.IO.File.Open(currentDirectory + "\\" + fileName, FileMode.OpenOrCreate, FileAccess.ReadWrite);
Then the file was getting created but the in next line its not loading and throws a exception as mentioned -
We are getting this error while running your sample Server side code for ASP.Net core using PostGres
in the line Syncfusion.EJ2.DocumentEditor.WordDocument document = Syncfusion.EJ2.DocumentEditor.WordDocument.Load(stream1, GetFormatType(type)); - With continuation to the point.2-
I can see the document that loads newly is the document with room name as the new file.
Can you please provide more info on where and how the source document is being picked in this case for applying the new changes.
Ex: as per the code the file that loads initially is GaintPanda.docx within the wwwroot folder
but on reaching the threshold the document is picked from the outer folder - Can you please provide more info on the transformation logic/algorithm and how it is working
Hi Mamatha,
|
The Document Editor employs an operational transformation algorithm to resolve conflicts during collaborative editing. For additional information on collaborative editing, please consult the documentation provided below. Documentation - https://ej2.syncfusion.com/documentation/document-editor/collaborative-editing/overview
|
|
Regarding 'overwriting the existing document':
The changes made in the session is applied to the source document once the threshold is reached. |
|
Based on the error provided, we believe the problem may be due to an invalid DOCX file. We recommend using a valid DOCX file. Please try using a valid DOCX file and inform us if you continue to encounter any issues with loading the file. |
|
Every document is assigned a unique room name, which identifies the specific document being edited by users. In our example, we have utilized a 'Getting Started' document. The document is fetched from the wwwroot directory on initial load using the GetSourceDocument API. Once a certain threshold is reached, we use the unique identifier to retrieve the document and apply the necessary changes, fetching the document from the wwwroot directory in our sample. In your application, it is necessary to maintain a unique identifier for each document. This unique identifier allows you to retrieve the document for opening and saving in the Document Editor.
|
|
The Document Editor employs an operational transformation algorithm to resolve conflicts during collaborative editing. For additional information on collaborative editing, please consult the documentation provided below. Documentation - https://ej2.syncfusion.com/documentation/document-editor/collaborative-editing/overview
|
Regards,
Dhanush S
Hi Mamatha,
|
The Document Editor employs an operational transformation algorithm to resolve conflicts during collaborative editing. For additional information on collaborative editing, please consult the documentation provided below. Documentation - https://ej2.syncfusion.com/documentation/document-editor/collaborative-editing/overview
|
|
Regarding 'overwriting the existing document':
The changes made in the session is applied to the source document once the threshold is reached. |
|
Based on the error provided, we believe the problem may be due to an invalid DOCX file. We recommend using a valid DOCX file. Please try using a valid DOCX file and inform us if you continue to encounter any issues with loading the file. |
|
Every document is assigned a unique room name, which identifies the specific document being edited by users. In our example, we have utilized a 'Getting Started' document. The document is fetched from the wwwroot directory on initial load using the GetSourceDocument API. Once a certain threshold is reached, we use the unique identifier to retrieve the document and apply the necessary changes, fetching the document from the wwwroot directory in our sample. In your application, it is necessary to maintain a unique identifier for each document. This unique identifier allows you to retrieve the document for opening and saving in the Document Editor.
|
|
The Document Editor employs an operational transformation algorithm to resolve conflicts during collaborative editing. For additional information on collaborative editing, please consult the documentation provided below. Documentation - https://ej2.syncfusion.com/documentation/document-editor/collaborative-editing/overview
|
Regards,
Dhanush S
- 7 Replies
- 4 Participants
-
CC Christian Casal
- Jan 15, 2025 03:19 PM UTC
- Feb 4, 2025 02:35 PM UTC