diff --git a/Document-Processing/Word/Word-Processor/vue/accessibility.md b/Document-Processing/Word/Word-Processor/vue/accessibility.md
index 936562a8cf..16cdc9227a 100644
--- a/Document-Processing/Word/Word-Processor/vue/accessibility.md
+++ b/Document-Processing/Word/Word-Processor/vue/accessibility.md
@@ -1,14 +1,14 @@
---
layout: post
-title: Accessibility in Vue Document editor component | Syncfusion
-description: Learn here all about Accessibility in Syncfusion Vue Document editor component of Syncfusion Essential JS 2 and more.
+title: Accessibility in Vue DOCX Editor component | Syncfusion
+description: Learn here all about Accessibility in Syncfusion Vue DOCX Editor component of Syncfusion Essential JS 2 and more.
control: Accessibility
platform: document-processing
documentation: ug
domainurl: ##DomainURL##
---
-# Accessibility in Vue Document editor component
+# Accessibility in Vue DOCX Editor component
The accessibility compliance for the [Vue DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/vue-docx-editor) (Document Editor) component is outlined below.
@@ -38,13 +38,13 @@ The accessibility compliance for the [Vue DOCX Editor](https://www.syncfusion.co
## Keyboard interaction
-Document editor supports [keyboard shortcuts](./keyboard-shortcut).
+DOCX Editor supports [keyboard shortcuts](./keyboard-shortcut).
## Ensuring accessibility
-The Document editor component's accessibility levels are ensured through an [accessibility-checker](https://www.npmjs.com/package/accessibility-checker) and [axe-core](https://www.npmjs.com/package/axe-core) software tools during automated testing.
+The DOCX Editor component's accessibility levels are ensured through an [accessibility-checker](https://www.npmjs.com/package/accessibility-checker) and [axe-core](https://www.npmjs.com/package/axe-core) software tools during automated testing.
-The accessibility compliance of the Document editor component is shown in the following sample. Open the [sample](https://ej2.syncfusion.com/accessibility/wordprocessor.html) in a new window to evaluate the accessibility of the Document editor component with accessibility tools.
+The accessibility compliance of the DOCX Editor component is shown in the following sample. Open the [sample](https://ej2.syncfusion.com/accessibility/wordprocessor.html) in a new window to evaluate the accessibility of the DOCX Editor component with accessibility tools.
{% previewsample "https://ej2.syncfusion.com/accessibility/wordprocessor.html" %}
diff --git a/Document-Processing/Word/Word-Processor/vue/bookmark.md b/Document-Processing/Word/Word-Processor/vue/bookmark.md
index 45a7c8fc5b..4d97c46aff 100644
--- a/Document-Processing/Word/Word-Processor/vue/bookmark.md
+++ b/Document-Processing/Word/Word-Processor/vue/bookmark.md
@@ -1,14 +1,14 @@
---
layout: post
-title: Bookmark in Vue Document editor component | Syncfusion
-description: Learn here all about Bookmark in Syncfusion Vue Document editor component of Syncfusion Essential JS 2 and more.
+title: Bookmark in Vue DOCX Editor component | Syncfusion
+description: Learn here all about Bookmark in Syncfusion Vue DOCX Editor component of Syncfusion Essential JS 2 and more.
control: Bookmark
platform: document-processing
documentation: ug
domainurl: ##DomainURL##
---
-# Bookmark in Vue Document editor component
+# Bookmark in Vue DOCX Editor component
Bookmark is a powerful tool that helps you to mark a place in the document to find again easily. You can enter many bookmarks in the document and give each one a unique name to identify easily.
@@ -30,10 +30,10 @@ this.$refs.container.ej2Instances.documentEditor.editor.insertBookmark("Bookmark
You can select the bookmark in the document using [`selectBookmark`](https://ej2.syncfusion.com/vue/documentation/api/document-editor/selection#selectbookmark) method by providing Bookmark name to select as shown in the following code snippet.
```c#
-this.$refs.container.ej2Instances.documentEditor.selection.selectBookmark("Bookmark1", true)
+this.$refs.container.ej2Instances.documentEditor.selection.selectBookmark("Bookmark1", true);
```
->Note: Second parameter is optional parameter and it denotes is exclude bookmark start and end from selection. If true, excludes bookmark start and end from selection.
+>Note: The second parameter is an optional parameter and it denotes whether to exclude the bookmark start and end from the selection. If true, excludes the bookmark start and end from the selection.
## Delete Bookmark
@@ -51,7 +51,7 @@ You can get all the bookmarks in the document using [`getBookmarks`](https://ej2
this.$refs.container.ej2Instances.documentEditor.getBookmarks(false);
```
->Note: Parameter denotes is include hidden bookmarks. If false, ignore hidden bookmark.
+>Note: The parameter denotes whether to include hidden bookmarks. If false, hidden bookmarks are ignored.
## Get Bookmark from selection
@@ -67,19 +67,19 @@ You can replace bookmark content without removing the bookmark start and end for
```csharp
this.$refs.container.ej2Instances.documentEditor.selection.selectBookmark("Bookmark1", true);
-this.$refs.container.ej2Instances.documentEditor.editor.insertText('Hello World')
+this.$refs.container.ej2Instances.documentEditor.editor.insertText('Hello World');
```
You can replace content by removing the bookmark start and end, thus the bookmark content can't be tracked in future.
```csharp
this.$refs.container.ej2Instances.documentEditor.selection.selectBookmark("Bookmark1");
-this.$refs.container.ej2Instances.documentEditor.editor.insertText('Hello World')
+this.$refs.container.ej2Instances.documentEditor.editor.insertText('Hello World');
```
## Show or Hide bookmark
-You can show or hide the show square brackets around bookmarked items in Document editor component.
+You can show or hide the square brackets around bookmarked items in DOCX Editor component.
The following example code illustrates how to show or hide square brackets around bookmarked items.
@@ -89,7 +89,7 @@ this.$refs.container.ej2Instances.documentEditorSettings.showBookmarks = true;
## Bookmark Dialog
-The following example shows how to open bookmark dialog in Document Editor.
+The following example shows how to open bookmark dialog in DOCX Editor.
{% tabs %}
{% highlight html tabtitle="Composition API (~/src/App.vue)" %}
@@ -104,7 +104,7 @@ The following example shows how to open bookmark dialog in Document Editor.
## Online Demo
-Explore how to insert and manage bookmarks in Word documents using the Vue Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/vue/#/tailwind3/document-editor/links-and-bookmarks.html).
+Explore how to insert and manage bookmarks in Word documents using the Vue DOCX Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/vue/#/tailwind3/document-editor/links-and-bookmarks.html).
## See Also
diff --git a/Document-Processing/Word/Word-Processor/vue/chart.md b/Document-Processing/Word/Word-Processor/vue/chart.md
index 6e7059f786..2a73124584 100644
--- a/Document-Processing/Word/Word-Processor/vue/chart.md
+++ b/Document-Processing/Word/Word-Processor/vue/chart.md
@@ -1,18 +1,18 @@
---
layout: post
-title: Chart in Vue Document editor component | Syncfusion
-description: Learn here all about Chart in Syncfusion Vue Document editor component of Syncfusion Essential JS 2 and more.
+title: Chart in Vue DOCX Editor component | Syncfusion
+description: Learn here all about Chart in Syncfusion Vue DOCX Editor component of Syncfusion Essential JS 2 and more.
control: Chart
platform: document-processing
documentation: ug
domainurl: ##DomainURL##
---
-# Chart in Vue Document editor component
+# Chart in Vue DOCX Editor component
-[Vue DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/vue-docx-editor) (Document Editor) provides chart preservation support. Using Document Editor, you can see the chart reports from your Word document.
+[Vue DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/vue-docx-editor) (Document Editor) provides chart preservation support. Using DOCX Editor, you can see the chart reports from your Word document.
-The following example shows chart preservation in Document Editor.
+The following example shows chart preservation in DOCX Editor.
{% tabs %}
{% highlight html tabtitle="Composition API (~/src/App.vue)" %}
@@ -27,7 +27,8 @@ The following example shows chart preservation in Document Editor.
# Supported Chart Types
-The following chart types are supported in Document Editor
+The following chart types are supported in DOCX Editor:
+
* Scatter_Markers
* Bubble
* Area
@@ -50,4 +51,9 @@ The following chart types are supported in Document Editor
## Online Demo
-Explore how to preserve charts in Word documents using the Vue Document Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/vue/#/tailwind3/document-editor/chart.html).
\ No newline at end of file
+Explore how to preserve charts in Word documents using the Vue DOCX Editor in this live demo [here](https://document.syncfusion.com/demos/docx-editor/vue/#/tailwind3/document-editor/chart.html).
+
+## See Also
+
+* [Feature modules](./feature-module)
+* [Getting started](./getting-started)
\ No newline at end of file
diff --git a/Document-Processing/Word/Word-Processor/vue/clipboard.md b/Document-Processing/Word/Word-Processor/vue/clipboard.md
index 654d4feed9..0a2dd6b0f0 100644
--- a/Document-Processing/Word/Word-Processor/vue/clipboard.md
+++ b/Document-Processing/Word/Word-Processor/vue/clipboard.md
@@ -1,20 +1,20 @@
---
layout: post
-title: Clipboard in Vue Document editor component | Syncfusion
-description: Learn here all about Clipboard in Syncfusion Vue Document editor component of Syncfusion Essential JS 2 and more.
+title: Clipboard in Vue DOCX Editor component | Syncfusion
+description: Learn here all about Clipboard in Syncfusion Vue DOCX Editor component of Syncfusion Essential JS 2 and more.
control: Clipboard
platform: document-processing
documentation: ug
domainurl: ##DomainURL##
---
-# Clipboard in Vue Document editor component
+# Clipboard in Vue DOCX Editor component
[Vue DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/vue-docx-editor) (Document Editor) takes advantage of system clipboard and allows you to copy or move a portion of the document into it in HTML format, so that it can be pasted in any application that supports clipboard.
## Copy
-Copy a portion of document to system clipboard using built-in context menu of Document Editor. You can also do it programmatically using the following sample code.
+Copy a portion of document to system clipboard using built-in context menu of DOCX Editor. You can also do it programmatically using the following sample code.
```javascript
this.$refs.documenteditor.ej2Instances.selection.copy();
@@ -22,7 +22,7 @@ Copy a portion of document to system clipboard using built-in context menu of Do
## Cut
-Cut a portion of document to system clipboard using built-in context menu of Document Editor. You can also do it programmatically using the following sample code.
+Cut a portion of document to system clipboard using built-in context menu of DOCX Editor. You can also do it programmatically using the following sample code.
```javascript
this.$refs.documenteditor.ej2Instances.editor.cut();
@@ -30,21 +30,21 @@ Cut a portion of document to system clipboard using built-in context menu of Doc
## Paste
-Due to limitations, you can paste contents from system clipboard as plain text in Document Editor only using the ‘CTRL + V’ keyboard shortcut.
+Due to browser limitations, you can paste contents from system clipboard as plain text in DOCX Editor only using the ‘CTRL + V’ keyboard shortcut.
## Local paste
-Document Editor expose API to enable local paste within the control. On enabling this, the following is performed:
+DOCX Editor exposes an API to enable local paste within the control. On enabling this, the following is performed:
* Selected contents will be stored to an internal clipboard in addition to system clipboard.
* Clipboard paste will be overridden, and internally stored data that has formatted text will be pasted.
Refer to the following sample code.
-```
-
+```html
+
```
By default, **enableLocalPaste** is false.
-When local paste is enabled for a Document Editor instance, you can paste contents programmatically if the internal clipboard has stored data during last copy operation. Refer to the following sample code.
+When local paste is enabled for a DOCX Editor instance, you can paste contents programmatically if the internal clipboard has stored data during last copy operation. Refer to the following sample code.
```javascript
this.$refs.documenteditor.ej2Instances.editor.pasteLocal();
@@ -54,16 +54,16 @@ When local paste is enabled for a Document Editor instance, you can paste conten
|**EnableLocalPaste** |**Paste behavior details**|
|--------------------------|----------------------|
-|True |Allows to paste content that is copied from the same Document Editor component alone and prevents pasting content from system clipboard. Hence the content copied from outside Document Editor component can’t be pasted.
Browser limitation of pasting from system clipboard using API and context menu options, will be resolved. So, you can copy and paste content within the Document Editor component using API and context menu options too.|
-|False|Allows to paste content from system clipboard. Hence the content copied from both the Document Editor component and outside can be pasted.
Browser limitation of pasting from system clipboard using API and context menu options, will remain as a limitation.|
+|True |Allows to paste content that is copied from the same DOCX Editor component alone and prevents pasting content from system clipboard. Hence the content copied from outside DOCX Editor component can’t be pasted.
Browser limitation of pasting from system clipboard using API and context menu options, will be resolved. So, you can copy and paste content within the DOCX Editor component using API and context menu options too.|
+|False|Allows to paste content from system clipboard. Hence the content copied from both the DOCX Editor component and outside can be pasted.
Browser limitation of pasting from system clipboard using API and context menu options, will remain as a limitation.|
Note:
* Keyboard shortcut for pasting will work properly in both cases.
-* Copying content from Document Editor component and pasting outside will work properly in both cases.
+* Copying content from DOCX Editor component and pasting outside will work properly in both cases.
## Paste with formatting
-Document Editor provides support to paste the system clipboard data with formatting. To enable clipboard paste with formatting options, set the `enableLocalPaste` property in Document Editor to false and use this .NET Standard library [`Syncfusion.EJ2.WordEditor.AspNet.Core`]() by the web API service implementation. This library helps you to paste the system clipboard data with formatting.
+DOCX Editor provides support to paste the system clipboard data with formatting. To enable clipboard paste with formatting options, set the `enableLocalPaste` property in DOCX Editor to false and use this .NET Standard library [`Syncfusion.EJ2.WordEditor.AspNet.Core`]() by the web API service implementation. For more information on setting up the web API service, refer to [Web services overview](./web-services-overview). This library helps you to paste the system clipboard data with formatting.
You can paste your system clipboard data in the following ways:
* **Keep Source Formatting** This option retains the character styles and direct formatting applied to the copied text. Direct formatting includes characteristics such as font size, italics, or other formatting that is not included in the paragraph style.
@@ -74,7 +74,7 @@ This paste option appears as follows.

-N> When you paste content from an external source into the Document Editor, some formatting or elements may not appear as expected because certain elements are not supported. Refer [here](./unsupported-features) to learn more about unsupported elements.
+N> When you paste content from an external source into the DOCX Editor, some formatting or elements may not appear as expected because certain elements are not supported. Refer [here](./unsupported-features) to learn more about unsupported elements.
## See Also
diff --git a/Document-Processing/Word/Word-Processor/vue/collaborative-editing/overview.md b/Document-Processing/Word/Word-Processor/vue/collaborative-editing/overview.md
index 4ec279999f..b9ebd0bae2 100644
--- a/Document-Processing/Word/Word-Processor/vue/collaborative-editing/overview.md
+++ b/Document-Processing/Word/Word-Processor/vue/collaborative-editing/overview.md
@@ -1,23 +1,23 @@
---
layout: post
-title: Collaborative Editing in Vue Document editor control | Syncfusion
-description: Learn about collaborative editing in Syncfusion Vue Document editor control of Syncfusion Essential JS 2 and more.
+title: Collaborative Editing in Vue DOCX Editor control | Syncfusion
+description: Learn about collaborative editing in Syncfusion Vue DOCX Editor control of Syncfusion Essential JS 2 and more.
platform: document-processing
control: Collaborative Editing
documentation: ug
domainurl: ##DomainURL##
---
-# Collaborative Editing in Vue
+# Collaborative Editing in Vue DOCX editor component
-Allows multiple users to work on the same document simultaneously. This can be done in real-time, so that collaborators can see the changes as they are made. Collaborative editing can be a great way to improve efficiency, as it allows team members to work together on a document without having to wait for others to finish their changes.
+Vue DOCX Editor (Document Editor) supports collaborative editing which allows multiple users to work on the same document simultaneously. This can be done in real-time, so that collaborators can see the changes as they are made. Collaborative editing can be a great way to improve efficiency, as it allows team members to work together on a document without having to wait for others to finish their changes.
## Prerequisites
-- *Real-time Transport Protocol*: This protocol facilitates instant communication between clients and the server, ensuring immediate updates during collaborative editing.
+- *Real-time Transport Protocol*: This protocol facilitates instant communication between clients and the server, ensuring immediate updates during collaborative editing. For setup details, refer to the [Web services overview](../vue/web-services-overview).
- *Distributed Cache or Database*: Used to temporarily store the queue of editing operations.
-### Real time transport protocol
+### Real-time transport protocol
- *Managing Connections*: Keeps active connections open for real-time collaboration, allowing seamless communication between users and the server.
- *Broadcasting Changes*: Ensures that any edits made by one user are instantly sent to all collaborators, keeping everyone on the same page with the latest document version.
@@ -30,13 +30,13 @@ To support collaborative editing, it's crucial to have a backing system that tem
- ***Database***: With the same server configuration, it can handle up to 50 requests per second.
-Using the distributed cache or database all the editing operations are queued in order and conflict resolution is performed using `Operational Transformation` algorithm.
+Using the distributed cache or database all the editing operations are queued in order and conflict resolution is performed using `Operational Transformation` algorithm. Operational Transformation is a concurrency-control technique that reconciles concurrent edits by transforming the position and content of operations so all clients converge to the same final document state.
->**Tips**: To calculate the average requests per second of your application Assume the editor in your live application is actively used by 1000 users and each user’s edit can trigger 2 to 5 requests per second. The total requests per second of your applications will be around 2000 to 5000. In this case, you can finalize a configuration to support around 5000 average requests per second.
+>**Tips**: To calculate the average requests per second of your application, assume the editor in your live application is actively used by 1000 users. Each user's edit can trigger 2 to 5 requests per second, so the total requests per second of your application will be around 2000 to 5000. In this case, you can finalize a configuration to support around 5000 average requests per second.
>**Note**: The above metrics are based solely on the collaborative editing module. Actual throughput may decrease depending on other server-side interactions, such as document importing, pasting formatted content, editing restrictions, and spell checking. Therefore, it is advisable to monitor your app’s traffic and choose a configuration that best suits your needs.
-#### See Also
+## See Also
- [Collaborative editing using Redis cache in ASP.NET Core](../collaborative-editing/using-redis-cache-asp-net-core)
- [Collaborative editing using Java](../collaborative-editing/using-redis-cache-java)
\ No newline at end of file
diff --git a/Document-Processing/Word/Word-Processor/vue/collaborative-editing/using-redis-cache-asp-net-core.md b/Document-Processing/Word/Word-Processor/vue/collaborative-editing/using-redis-cache-asp-net-core.md
index 770dbcfa8a..b38eb8fb81 100644
--- a/Document-Processing/Word/Word-Processor/vue/collaborative-editing/using-redis-cache-asp-net-core.md
+++ b/Document-Processing/Word/Word-Processor/vue/collaborative-editing/using-redis-cache-asp-net-core.md
@@ -10,22 +10,42 @@ domainurl: ##DomainURL##
# Collaborative editing in Vue DOCX Editor
-Vue DOCX Editor (Document Editor) supports collaborative editing which Allows multiple users to work on the same document simultaneously. This can be done in real-time, so that collaborators can see the changes as they are made
+Vue DOCX Editor (Document Editor) supports collaborative editing which allows multiple users to work on the same document simultaneously. This can be done in real-time, so that collaborators can see the changes as they are made.
## Prerequisites
- [Vue DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/vue-docx-editor) (Document Editor).
+The following prerequisites are required to set up collaborative editing using Redis in an ASP.NET Core backend. SignalR handles real-time communication between clients and the server, while Redis stores the queue of editing operations.
+
+- [Vue DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/vue-docx-editor) (DOCX Editor).
- SignalR
- Redis
+Configure CORS in the ASP.NET Core web service to allow the Vue application's origin (e.g., `http://localhost:8080` or your deployed domain) to call the API endpoints. Add CORS services and middleware in `Program.cs`:
+
+```csharp
+// In Program.cs
+builder.Services.AddCors(options =>
+{
+ options.AddPolicy("AllowAllOrigins", policy =>
+ {
+ builder.AllowAnyOrigin()
+ .AllowAnyHeader()
+ .AllowAnyMethod()
+ });
+});
+
+// ...later in the pipeline configuration
+app.UseCors();
+```
+
## SignalR
SignalR enables real-time communication by instantly sending and receiving document changes between clients and the server, ensuring seamless collaboration. In distributed environments, it can be scaled using Azure SignalR Service or a Redis backplane.
### Scale-out SignalR using Azure SignalR service
-Azure SignalR Service is a scalable, managed service for real-time communication in web applications. It enables real-time messaging between web clients (browsers) and your server-side application(across multiple servers).
+Azure SignalR Service is a scalable, managed service for real-time communication in web applications. It enables real-time messaging between web clients (browsers) and your server-side application (across multiple servers).
The following code snippet demonstrates how to configure Azure SignalR in an ASP.NET Core application using the `AddAzureSignalR` method in the "Program.cs" file of the web service project.
@@ -77,7 +97,7 @@ builder.Services.AddDistributedMemoryCache().AddSignalR().AddStackExchangeRedis(
In collaborative editing, Redis is used to store temporary data that helps queue editing operations and resolve conflicts using the `Operational Transformation` algorithm.
-All editing operations are stored in the Redis cache. To prevent memory buildup, a `SaveThreshold` limit can be configured at the application level. For example, if the SaveThreshold is set to 100, up to twice that number of editing operations are retained in Redis per document. When this limit is exceeded, the first 100 operations (as defined by the save threshold) are removed from the cache and automatically saved to the source document.
+All editing operations are stored in the Redis cache. To prevent memory buildup, a `SaveThreshold` limit can be configured at the application level. For example, if the SaveThreshold is set to 100, up to 200 editing operations (twice the SaveThreshold) are retained in Redis per document. When this limit is exceeded, the first 100 operations (as defined by the SaveThreshold) are removed from the cache and automatically saved to the source document, while the remaining operations stay in the cache for subsequent edits.
The configuration and storage size of the Redis cache can be adjusted based on the following considerations:
@@ -95,7 +115,7 @@ The configuration and storage size of the Redis cache can be adjusted based on t
Collaborative editing is built using three main components:
-### Client (Vue Document Editor)
+### Client (Vue DOCX Editor)
- Captures user edits in the document
@@ -119,17 +139,17 @@ Collaborative editing is built using three main components:
- Resolves conflicts between multiple users using the OT algorithm
-## Integrate collaborative editing in client side
+## Integrate collaborative editing on the client side
-### Step 1: Integrate Document Editor in Vue sample
+### Step 1: Integrate DOCX Editor in Vue sample
-Refer to the following documentation to get started with the [Vue Document Editor](https://help.syncfusion.com/document-processing/word/word-processor/vue/getting-started)
+Refer to the following documentation to get started with the [Vue DOCX Editor](https://help.syncfusion.com/document-processing/word/word-processor/vue/getting-started)
### Step 2: Enable collaborative editing
-To enable collaborative editing, inject `CollaborativeEditingHandler` and set the `enableCollaborativeEditing` property to true in the Document Editor.
+To enable collaborative editing, inject `CollaborativeEditingHandler` and set the `enableCollaborativeEditing` property to true in the DOCX Editor.
-The following code snippet demonstrates how to enable collaborative editing in the Document Editor.
+The following code snippet demonstrates how to enable collaborative editing in the DOCX Editor.
```javaScript
@@ -153,7 +173,7 @@ export default {
data() {
return {
serviceUrl: 'http://localhost:5212/api/documenteditor/',
- collborativeEditingServiceUrl: "http://localhost:5212/",
+ collaborativeEditingServiceUrl: "http://localhost:5212/",
collaborativeEditingHandler: null,
connection: null,
};
@@ -165,7 +185,7 @@ export default {
onCreated() {
// Inject collaborative editing module.
DocumentEditor.Inject(CollaborativeEditingHandler);
- // Enable collaborative editing in Document Editor.
+ // Enable collaborative editing in DOCX Editor.
this.$refs.doceditcontainer.ej2Instances.documentEditor.enableCollaborativeEditing = true;
this.initializeSignalR();
this.loadDocumentFromServer();
@@ -180,7 +200,7 @@ export default {
To broadcast changes and receive updates from remote users, install the [Microsoft SignalR npm](https://www.npmjs.com/package/@microsoft/signalr) package in the Vue application.
-The following code snippet demonstrates how to configure SignalR in the Document Editor.
+The following code snippet demonstrates how to configure SignalR in the DOCX Editor.
```javaScript
import { HubConnectionBuilder, HttpTransportType, HubConnectionState } from '@microsoft/signalr';
@@ -188,20 +208,20 @@ import { HubConnectionBuilder, HttpTransportType, HubConnectionState } from '@mi
methods: {
initializeSignalR() {
// SignalR connection
- this.connection = new HubConnectionBuilder().withUrl(this.collborativeEditingServiceUrl + 'documenteditorhub', {
+ this.connection = new HubConnectionBuilder().withUrl(this.collaborativeEditingServiceUrl + 'documenteditorhub', {
skipNegotiation: true,
transport: HttpTransportType.WebSockets
}).withAutomaticReconnect().build();
// Event handler for signalR connection
- this.connection.on('dataReceived', this.onDataRecived.bind(this));
+ this.connection.on('dataReceived', this.onDataReceived.bind(this));
this.connection.onclose(async () => {
if (this.connection && this.connection.state === HubConnectionState.Disconnected) {
- alert('Connection lost. Please relod the browser to continue.');
+ alert('Connection lost. Please reload the browser to continue.');
}
});
},
- onDataRecived(action, data) {
+ onDataReceived(action, data) {
if (this.collaborativeEditingHandler) {
if (action == 'connectionId') {
// Update the current connection id to track other users
@@ -247,11 +267,11 @@ methods: {
const urlParams = new URLSearchParams(queryString);
let roomId = urlParams.get('id');
if (roomId == null) {
- roomId = Math.random().toString(32).slice(2)
+ roomId = Math.random().toString(36).slice(2)
window.history.replaceState({}, "", `?id=` + roomId);
}
var httpRequest = new XMLHttpRequest();
- httpRequest.open('Post', this.collborativeEditingServiceUrl + 'api/CollaborativeEditing/ImportFile', true);
+ httpRequest.open('Post', this.collaborativeEditingServiceUrl + 'api/CollaborativeEditing/ImportFile', true);
httpRequest.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
httpRequest.onreadystatechange = () => {
if (httpRequest.readyState === 4) {
@@ -274,7 +294,7 @@ methods: {
if (this.$refs.doceditcontainer) {
this.collaborativeEditingHandler = this.$refs.doceditcontainer.ej2Instances.documentEditor.collaborativeEditingHandlerModule;
// Update the room and version information to collaborative editing handler.
- this.collaborativeEditingHandler.updateRoomInfo(roomName, data.version, this.collborativeEditingServiceUrl + 'api/CollaborativeEditing/');
+ this.collaborativeEditingHandler.updateRoomInfo(roomName, data.version, this.collaborativeEditingServiceUrl + 'api/CollaborativeEditing/');
// Open the document
this.$refs.doceditcontainer.ej2Instances.documentEditor.open(data.sfdt);
@@ -295,20 +315,21 @@ methods: {
Changes made on the client side must be transmitted to the server to be broadcast to other connected users.
-The following code snippet demonstrates how to send changes to the server using the `contentChange` event in the Document Editor.
+The following code snippet demonstrates how to send changes to the server using the `contentChange` event in the DOCX Editor.
```javaScript
methods: {
onContentChange(args) {
if (this.collaborativeEditingHandler) {
// Send the editing action to server
- this.collaborativeEditingHandler.sendActionToServer(args.operations)
- },
+ this.collaborativeEditingHandler.sendActionToServer(args.operations);
+ }
+ },
}
```
-## Integrate collaborative editing in server side
+## Integrate collaborative editing on the server side
-### Step 1: Create the Document Editor web service project
+### Step 1: Create the DOCX Editor web service project
Create an ASP.NET Core web service to handle server-side operations.
@@ -330,7 +351,7 @@ Configure the Redis that stores temporary data for the collaborative editing ses
// other code snippet
"ConnectionStrings": {
- "RedisConnectionString": "<>"
+ "RedisConnectionString": ""
}
// other code snippet
@@ -384,37 +405,37 @@ Add the following code to the file to manage SignalR groups using room names.
// Join group based on the room name and store the user details in Redis cache.
public async Task JoinGroup(ActionInfo info)
{
- // Set the connection ID to info
+ // Set the connection ID on the info object
info.ConnectionId = Context.ConnectionId;
// Add the connection ID to the group
await Groups.AddToGroupAsync(Context.ConnectionId, info.RoomName);
- //To ensure whether the room exixts in the Redis cache
+ //To ensure whether the room exists in the Redis cache
bool roomExists = await _db.KeyExistsAsync(info.RoomName + CollaborativeEditingHelper.UserInfoSuffix);
if (roomExists)
{
// Fetch all connected users from Redis
var allUsers = await _db.HashGetAllAsync(info.RoomName + CollaborativeEditingHelper.UserInfoSuffix);
var userList = allUsers.Select(u => JsonConvert.DeserializeObject(u.Value)).ToList();
-
- //Send the exisiting user details to the newly joined user.
+
+ //Send the existing user details to the newly joined user.
await Clients.Caller.SendAsync("dataReceived", "addUser", userList);
}
-
- // Add user to Redis
+
+ // Add user to Redis
await _db.HashSetAsync(info.RoomName + CollaborativeEditingHelper.UserInfoSuffix, Context.ConnectionId, JsonConvert.SerializeObject(info));
-
+
// Store the room name with the connection ID
await _db.HashSetAsync(CollaborativeEditingHelper.ConnectionIdRoomMappingKey, Context.ConnectionId, info.RoomName);
-
- // Notify all the exsisiting users in the group about the new user
+
+ // Notify all the existing users in the group about the new user
await Clients.GroupExcept(info.RoomName, Context.ConnectionId).SendAsync("dataReceived", "addUser", info);
}
{% endhighlight %}
{% endtabs %}
-#### 3. Handle user disconnection
+#### 3. Handle user disconnection
The following code snippet demonstrates how to disconnect a connection using SignalR.
@@ -442,7 +463,7 @@ The following code snippet demonstrates how to disconnect a connection using Sig
if (pendingOps.Length > 0)
{
List actions = new List();
- // Prepare the message fir adding it in background service queue.
+ // Prepare the message for adding it in background service queue.
foreach (var element in pendingOps)
{
actions.Add(JsonConvert.DeserializeObject(element.ToString()));
@@ -532,7 +553,7 @@ The following code snippet demonstrates how the operations are cached and update
try
{
ActionInfo modifiedAction = await AddOperationsToCache(param);
- //After transformation broadcast changes to all users in the gropu
+ //After transformation broadcast changes to all users in the group
await _hubContext.Clients.Group(param.RoomName).SendAsync("dataReceived", "action", modifiedAction);
return modifiedAction;
}
@@ -643,6 +664,21 @@ For more details about code snippet, please refer this [link](https://github.com
This step implements a thread-safe, bounded queue to handle document save requests asynchronously without blocking the main application flow. It uses a channel-based approach with a fixed capacity to efficiently manage concurrent operations. The background service processes each save request by loading the document, applying changes, saving the updated file, and clearing the cache to maintain consistency.
+Create the following service classes (place them in a `Services` folder):
+
+- **`ISaveTaskQueue` / `SaveTaskQueue`**: A bounded `Channel`-based queue that exposes `QueueBackgroundWorkItemAsync(SaveInfo)` for the hub and controller to enqueue save requests.
+- **`SaveTaskService` (`IHostedService` / `BackgroundService`)**: A long-running background worker that dequeues `SaveInfo` items, applies the actions to the source document, writes the file back, and clears the Redis cache for the room.
+
+Register the connection multiplexer and queue in `Program.cs`:
+
+```csharp
+// In Program.cs
+builder.Services.AddSingleton(sp =>
+ ConnectionMultiplexer.Connect(builder.Configuration.GetConnectionString("RedisConnectionString")));
+builder.Services.AddSingleton();
+builder.Services.AddHostedService();
+```
+
For more details about this code logic, please refer this [link](https://github.com/SyncfusionExamples/EJ2-Document-Editor-Collaborative-Editing/tree/master/Server%20side%20with%20distributed%20cache/ASP.NET%20Core/Using%20Redis/Services)
N> [View sample in GitHub](https://github.com/SyncfusionExamples/EJ2-Document-Editor-Collaborative-Editing/tree/master/Server%20side%20with%20distributed%20cache/ASP.NET%20Core/Using%20Redis).
\ No newline at end of file
diff --git a/Document-Processing/Word/Word-Processor/vue/collaborative-editing/using-redis-cache-java.md b/Document-Processing/Word/Word-Processor/vue/collaborative-editing/using-redis-cache-java.md
index 52b9f76ae4..4f0e4960e8 100644
--- a/Document-Processing/Word/Word-Processor/vue/collaborative-editing/using-redis-cache-java.md
+++ b/Document-Processing/Word/Word-Processor/vue/collaborative-editing/using-redis-cache-java.md
@@ -1,7 +1,7 @@
---
layout: post
-title: Collaborative Editing in Vue Document editor control | Syncfusion
-description: Learn how to enable collaborative editing in Syncfusion Vue Document editor control of Syncfusion Essential JS 2 and more.
+title: Collaborative Editing in Vue DOCX Editor control | Syncfusion
+description: Learn how to enable collaborative editing in Syncfusion Vue DOCX Editor control of Syncfusion Essential JS 2 and more.
control: Collaborative Editing Java
platform: document-processing
documentation: ug
@@ -10,20 +10,20 @@ domainurl: ##DomainURL##
# Collaborative Editing in Vue with Redis in Java
-Allows multiple users to work on the same document simultaneously. This can be done in real-time, so that collaborators can see the changes as they are made. Collaborative editing can be a great way to improve efficiency, as it allows team members to work together on a document without having to wait for others to finish their changes.
+Vue DOCX Editor (Document Editor) supports collaborative editing which allows multiple users to work on the same document simultaneously. This can be done in real-time, so that collaborators can see the changes as they are made. Collaborative editing can be a great way to improve efficiency, as it allows team members to work together on a document without having to wait for others to finish their changes.
## Prerequisites
-The following are needed to enable collaborative editing in [Vue DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/vue-docx-editor) (Document Editor).
+The following are needed to enable collaborative editing in [Vue DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/vue-docx-editor) (DOCX Editor).
- `SockJS`
- `Redis`
## How to enable collaborative editing in client side
-### Step 1: Enable collaborative editing in Document Editor
+### Step 1: Enable collaborative editing in DOCX Editor
-To enable collaborative editing, inject `CollaborativeEditingHandler` and set the property `enableCollaborativeEditing` to true in the Document Editor, like in the code snippet below.
+To enable collaborative editing, inject `CollaborativeEditingHandler` and set the property `enableCollaborativeEditing` to true in the DOCX Editor, like in the code snippet below.
```javaScript
@@ -54,7 +54,7 @@ export default {
methods: {
onCreated() {
DocumentEditor.Inject(CollaborativeEditingHandler);
- // Enable collaborative editing in Document Editor.
+ // Enable collaborative editing in DOCX Editor.
this.$refs.doceditcontainer.ej2Instances.documentEditor.enableCollaborativeEditing = true;
}
}
@@ -85,7 +85,7 @@ methods: {
this.joinGroup(roomName);
}
},
- //Receive the remote action and apply to currenty document.
+ // Receive the remote action and apply it to the current document.
onMessageReceived(data) {
const content = JSON.parse(data.body);
if (content.payload.operations != null) {
@@ -97,14 +97,19 @@ methods: {
### Step 3: Subscribe to specific topic while opening the document
-When opening a document, we need to generate a unique ID for each document. These unique IDs are then used to create rooms using SockJS, which facilitates sending and receiving data from the server.
+When opening a document, we need to use a unique identifier (such as the file name) for each document. These unique identifiers are then used to create rooms using SockJS, which facilitates sending and receiving data from the server.
```javaScript
methods: {
loadDocumentFromServer() {
+ let httpRequest = new XMLHttpRequest();
+ httpRequest.open('POST', this.collborativeEditingServiceUrl + '/ImportFile', true);
+ httpRequest.setRequestHeader('Content-Type', 'application/json');
httpRequest.onreadystatechange = () => {
if (httpRequest.readyState === 4) {
if (httpRequest.status === 200 || httpRequest.status === 304) {
+ let data = JSON.parse(httpRequest.responseText);
+ let roomName = this.fileName;
if (this.$refs.doceditcontainer) {
//Update the room and version information to collaborative editing handler.
this.collaborativeEditingHandler.updateRoomInfo(roomName, data.version, this.collborativeEditingServiceUrl);
@@ -134,7 +139,7 @@ methods: {
### Step 4: Broadcast current editing changes to remote users
-Changes made on the client-side need to be sent to the server-side to broadcast them to other connected users. To send the changes made to the server, use the method shown below from the document editor using the `contentChange` event.
+Changes made on the client-side need to be sent to the server-side to broadcast them to other connected users. To send the changes made to the server, use the method shown below from the DOCX Editor using the `contentChange` event.
```javaScript
methods: {
@@ -151,7 +156,7 @@ methods: {
### Step 1: Configure SockJS hub to create room for collaborative editing session.
-To manage groups for each document, create a folder named “Hub” and add a file named ``` DocumentEditorHub.java ``` inside it. Add the following code to the file to manage SockJS groups using room names.
+To manage groups for each document, create a folder named "Hub" and add a file named `DocumentEditorHub.java` inside it. Add the following code to the file to manage SockJS groups using room names.
Join the group by using unique id of the document by using `joinGroup` method.
@@ -168,9 +173,7 @@ public void joinGroup(ActionInfo info, SimpMessageHeaderAccessor headerAccessor,
MessageHeaders headers = new MessageHeaders(additionalHeaders);
// send the connection Id to the client
broadcastToRoom(docName, info, headers);
- …………
- …………
- …………
+ // Register the user in the room (e.g., add sessionId to the document map in Redis).
}
public static void broadcastToRoom(String roomName, Object payload, MessageHeaders headers) {
@@ -239,7 +242,7 @@ public String importFile(@RequestBody FilesPathInfo file) throws Exception {
#### Update editing records to Redis
- Each edit operation made by the user is sent to the server and is pushed to the Redis. Each operation receives a version number after being inserted into the Redis.
-- After inserting the records to the server, the position of the current editing operation must be transformed against any previous editing operations not yet synced with the client using the TransformOperation method.
+- After inserting the records to the server, the position of the current editing operation must be transformed against any previous editing operations not yet synced with the client using the `transformOperation` method.
- After performing the transformation, the current operation is broadcast to all connected users within the group.
```java
@@ -255,6 +258,7 @@ public ActionInfo updateAction(@RequestBody ActionInfo param) throws Exception {
private ActionInfo addOperationsToCache(ActionInfo action) throws Exception {
int clientVersion = action.getVersion();
+ // Serialize the action before storing it in Redis.
…………
…………
…………
@@ -267,16 +271,14 @@ private ActionInfo addOperationsToCache(ActionInfo action) throws Exception {
String[] values = { serializedAction, String.valueOf(clientVersion),
String.valueOf(CollaborativeEditingHelper.saveThreshold) };
- …………
- …………
- …………
+ // Execute the Redis script to persist and transform the action.
// Return the updated action
return action;
}
```
#### Add Web API to get previous operation as a backup to get lost operations
-On the client side, messages send from server using SockJS may be received in a different order, or some operations may be missed due to network issues. In these cases, we need a backup method to retrieve missing records from the Redis.
+On the client side, messages sent from the server using SockJS may be received in a different order, or some operations may be missed due to network issues. In these cases, we need a backup method to retrieve missing records from the Redis.
Using the following method, we can retrieve all operations after the last successful client-synced version and return all missing operations to the requesting client.
```java
@@ -315,15 +317,15 @@ public String getActionsFromServer(@RequestBody ActionInfo param) throws ClassNo
}
}
```
-## How to perform Scaling in Collaborative Editing.
+## How to perform scaling in Collaborative Editing.
-### Role of Scaling in Collaborative editing
-As the number of users increases, collaborative application face challenges in maintaining responsiveness and performance. This is where scaling becomes crucial. Scaling refers to the ability of an application to handle growing demands by effectively distributing the workload across multiple resources.
+### Role of scaling in Collaborative Editing
+As the number of users increases, collaborative editing applications face challenges in maintaining responsiveness and performance. This is where scaling becomes crucial. Scaling refers to the ability of an application to handle growing demands by effectively distributing the workload across multiple resources.
-During scaling the users may connected to different servers, so collaborative editing application introduces a specific challenge like, updating the edit operations to all the users connected in different serves. To overcome this issue you need to use ``` Redis Cache pub/sub ``` for message relay(syncing the editing operations to the users connected to different server instance)
+During scaling, users may be connected to different servers, so collaborative editing applications introduce a specific challenge: updating the edit operations to all the users connected in different servers. To overcome this issue, you need to use ``` Redis Cache pub/sub ``` for message relay (syncing the editing operations to the users connected to different server instances).
### Use of Redis Pub/Sub in scaling environment
-Redis offers Pub/Sub functionality. The publish/subscribe (pub/sub) pattern provides asynchronous communication among multiple AWS services without creating interdependency. When a user edits a document, the application can publish the changes to a Redis channel. Clients (in different server instances) subscribed to that channel receive real-time updates, reflecting the changes in their document views.
+Redis offers Pub/Sub functionality. The publish/subscribe (pub/sub) pattern provides asynchronous communication among multiple application instances without creating interdependency. When a user edits a document, the application can publish the changes to a Redis channel. Clients (in different server instances) subscribed to that channel receive real-time updates, reflecting the changes in their document views.
### Steps to configure Redis in Collaborative Editing Application
Refer to the below steps to know about the Redis pub/sub implementation to sync the messages.
@@ -340,25 +342,25 @@ spring.datasource.redisport= ""
Publish each editing operation to Redis channel with the room name. This will send notifications to all the users(in different servers) subscribed to that specific channel. Refer to the publishToRedis() method in DocumentEditorHub.Java for details.
```java
-try (Jedis jedis = RedisSubscriber.jedisPool.getResource()) {
-jedis.publish("collaborativeedtiting", new com.fasterxml.jackson.databind.ObjectMapper().writeValueAsString(payload));
- break;
- } catch (JedisConnectionException e) {
- }
+try (Jedis jedis = RedisSubscriber.jedisPool.getResource()) {
+ jedis.publish("collaborativeediting", new com.fasterxml.jackson.databind.ObjectMapper().writeValueAsString(payload));
+} catch (JedisConnectionException e) {
+ e.printStackTrace();
+}
```
#### Step 3: Subscribe to the specific channel using the Redis cache 'Subscribe'
- Redis cache will be initialized and subscribe to the specific channel using the Redis cache 'Subscribe' option. This ensures that users in any server will get notified when an editing operation is published to the Redis cache using the onMessage() API. Refer to the code snippet in RedisSubscriber.Java for details.
+Redis cache will be initialized and subscribed to the specific channel using the Redis cache 'Subscribe' option. This ensures that users in any server will be notified when an editing operation is published to the Redis cache using the onMessage() API. Refer to the code snippet in RedisSubscriber.Java for details.
```java
@PostConstruct
public void subscribeToInstanceChannel() {
//Subscriber to `collaborativeediting`
- String channel = "collaborativeedtiting";
+ String channel = "collaborativeediting";
new Thread(() -> {
JedisPoolConfig poolConfig = new JedisPoolConfig();
jedisPool = new JedisPool(poolConfig, REDIS_HOST, REDIS_PORT);
- try (Jedis jedis = jedisPool.getResource()) {
+ try (Jedis jedis = jedisPool.getResource()) {
jedis.subscribe(new JedisPubSub() {
@Override
public void onMessage(String channel, String message) {
diff --git a/Document-Processing/Word/Word-Processor/vue/comments.md b/Document-Processing/Word/Word-Processor/vue/comments.md
index db0a4b2555..f8b07cc715 100644
--- a/Document-Processing/Word/Word-Processor/vue/comments.md
+++ b/Document-Processing/Word/Word-Processor/vue/comments.md
@@ -1,14 +1,14 @@
---
layout: post
-title: Comments in Vue Document editor component | Syncfusion
-description: Learn here all about Comments in Syncfusion Vue Document editor component of Syncfusion Essential JS 2 and more.
+title: Comments in Vue DOCX Editor component | Syncfusion
+description: Learn here all about Comments in Syncfusion Vue DOCX Editor component of Syncfusion Essential JS 2 and more.
control: Comments
platform: document-processing
documentation: ug
domainurl: ##DomainURL##
---
-# Comments in Vue Document editor component
+# Comments in Vue DOCX Editor component
[Vue DOCX Editor](https://www.syncfusion.com/docx-editor-sdk/vue-docx-editor) (Document Editor) allows you to add comments to documents. You can add, navigate and remove comments in code and from the UI.
@@ -17,13 +17,15 @@ domainurl: ##DomainURL##
Comments can be inserted to the selected text.
```ts
-this.$refs.documenteditor.ej2Instances.editor.insertComment('Test comment');
+this.$refs.container.ej2Instances.documentEditor.editor.insertComment('Test comment');
```
## Add a New Comment with Date, Author, and Status
Comments can be inserted into the selected text with a specified date, author, and status [`insertComment`](https://ej2.syncfusion.com/vue/documentation/api/document-editor/editor#insertcomment).
```ts
+import { CommentProperties } from '@syncfusion/ej2-documenteditor';
+
// In this example, a comment with the text "Hello world"
// is added by the author Nancy Davolio on July 23, 2024, at 2:30 PM.
// The isResolved status is set to false.
@@ -39,8 +41,8 @@ let commentProperties: CommentProperties = {
isResolved: false // The status of the comment; false indicates it is unresolved.
};
-// Insert the comment with the specified properties into the document editor.
-this.$refs.documenteditor.ej2Instances.editor.insertComment('Hello world', commentProperties);
+// Insert the comment with the specified properties into the DOCX Editor.
+this.$refs.container.ej2Instances.documentEditor.editor.insertComment('Hello world', commentProperties);
```
## Add a Reply Comment with Date, Author, and Status
@@ -63,15 +65,15 @@ let commentProperties: CommentProperties = {
isResolved: false // The status of the comment; false indicates it is unresolved.
};
-// Insert the comment with the specified properties into the document editor.
-let comment: Comment = this.$refs.documenteditor.ej2Instances.editor.insertComment('Hello world', commentProperties);
-// Insert a reply comment with specified properties into the Document Editor
-this.$refs.documenteditor.ej2Instances.editor.insertReplyComment(comment.id, 'Hello world', commentProperties);
+// Insert the comment with the specified properties into the DOCX Editor.
+let comment: Comment = this.$refs.container.ej2Instances.documentEditor.editor.insertComment('Hello world', commentProperties);
+// Insert a reply comment with specified properties into the DOCX Editor
+this.$refs.container.ej2Instances.documentEditor.editor.insertReplyComment(comment.id, 'Hello world', commentProperties);
```
## Get Comments
-Document Editor allows to get the comments along with its reply and comment properties using [`getComments`](https://ej2.syncfusion.com/vue/documentation/api/document-editor#getcomments).
+DOCX Editor allows you to get the comments along with its reply and comment properties using [`getComments`](https://ej2.syncfusion.com/vue/documentation/api/document-editor#getcomments).
```ts
//Get Comments in the document along with the properties author, date, status.
@@ -84,21 +86,21 @@ Next and previous comments can be navigated using the below code snippet.
```ts
//Navigate to next comment
-this.$refs.documenteditor.ej2Instances.selection.navigateNextComment();
+this.$refs.container.ej2Instances.documentEditor.selection.navigateNextComment();
//Navigate to previous comment
-this.$refs.documenteditor.ej2Instances.selection.navigatePreviousComment();
+this.$refs.container.ej2Instances.documentEditor.selection.navigatePreviousComment();
```
## Delete comment
-Current comment can be deleted using [`deleteComment`](https://ej2.syncfusion.com/vue/documentation/api/document-editor/editor#deletecomment).
+The current comment can be deleted using [`deleteComment`](https://ej2.syncfusion.com/vue/documentation/api/document-editor/editor#deletecomment).
```ts
//Delete the current selected comment.
this.$refs.container.ej2Instances.documentEditor.editor.deleteComment();
-//Get Comments in the document along with the properties author, date, status.
+//Get comments before deletion. Refer to the Get Comments section above for details.
let commentinfo: CommentInfo[] = this.$refs.container.ej2Instances.documentEditor.getComments();
//Delete the particular parent comments and all of its reply comments
@@ -108,21 +110,23 @@ this.$refs.container.ej2Instances.documentEditor.editor.deleteComment(commentinf
this.$refs.container.ej2Instances.documentEditor.editor.deleteComment(commentinfo[0].replies[0].id);
```
-## Delete all comment
+## Delete all comments
All the comments in the document can be deleted using the below code snippet.
```ts
-this.$refs.documenteditor.ej2Instances.editor.deleteAllComments();
+this.$refs.container.ej2Instances.documentEditor.editor.deleteAllComments();
```
## Protect the document in comments only mode
-Document Editor provides support for protecting the document with `CommentsOnly` protection. In this protection, user allowed to add or edit comments alone in the document.
+To use the DOCX Editor component and its protection APIs, follow the [Getting Started](./getting-started) documentation to set up the component, then load a document before enforcing protection.
+
+DOCX Editor provides support for protecting the document with `CommentsOnly` protection. In this protection, user is allowed to add or edit comments alone in the document.
-Document editor provides an option to protect and unprotect document using [`enforceProtection`](https://ej2.syncfusion.com/vue/documentation/api/document-editor/editor#enforceprotection) and [`stopProtection`](https://ej2.syncfusion.com/vue/documentation/api/document-editor/editor#stopprotection) API.
+DOCX Editor provides an option to protect and unprotect document using [`enforceProtection`](https://ej2.syncfusion.com/vue/documentation/api/document-editor/editor#enforceprotection) and [`stopProtection`](https://ej2.syncfusion.com/vue/documentation/api/document-editor/editor#stopprotection) APIs.
-The following example code illustrates how to enforce and stop protection in Document editor container.
+The following example code illustrates how to enforce and stop protection in Document Editor container.
{% tabs %}
{% highlight html tabtitle="Composition API (~/src/App.vue)" %}
@@ -187,7 +191,7 @@ export default {
{% endhighlight %}
{% endtabs %}
-> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property.
+> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the DOCX Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property.
Comment only protection can be enabled in UI by using [Restrict Editing pane](./document-management#restrict-editing-pane)
@@ -199,7 +203,7 @@ Comment only protection can be enabled in UI by using [Restrict Editing pane](./
Mention support displays a list of items that users can select or tag from the suggested list. To use this feature, type the @ character in the comment box and select or tag the user from the suggestion list.
-The following example illustrates how to enable mention support in the Document Editor
+The following example illustrates how to enable mention support in the DOCX Editor
```
@@ -208,11 +212,9 @@ The following example illustrates how to enable mention support in the Document
```
-> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the Document Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property.
+> The Web API hosted link `https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/` utilized in the DOCX Editor's serviceUrl property is intended solely for demonstration and evaluation purposes. For production deployment, please host your own web service with your required server configurations. You can refer and reuse the [GitHub Web Service example](https://github.com/SyncfusionExamples/EJ2-DocumentEditor-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/word-processor-server) for hosting your own web service and use for the serviceUrl property.
## Events
@@ -253,14 +255,14 @@ import { provide, ref } from 'vue';
const container = ref(null);
let mentionData = [
- { "Name": "Mary Kate", "EmailId": "marry@company.com" },
+ { "Name": "Mary Kate", "EmailId": "mary@company.com" },
{ "Name": "Andrew James", "EmailId": "james@company.com" },
{ "Name": "Andrew Fuller", "EmailId": "andrew@company.com"}
];
provide('DocumentEditorContainer', [Toolbar]);
const settings= { mentionSettings: { dataSource: mentionData, fields: { text: 'Name' }} };
const beforeComment = function (args) {
- if(args.type === "Delete" && container.value.ej2Instances.currentUser !== args.author){
+ if(args.type === "Delete" && container.value.ej2Instances.documentEditor.currentUser !== args.author){
args.cancel = true;
}
}
@@ -292,7 +294,7 @@ const beforeComment = function (args) {