Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,23 @@ container.documentEditor.selection.navigateNextRevision();
container.documentEditor.selection.navigatePreviousRevision();
```

## Custom Colors for Track Changes

You can set an array of colors to show track changes such as insertions and deletions in the DOCX editor.
Each author is assigned a color in order: the first author gets the first color, the second author gets the next, and so on.
If there are more authors than colors, the assignment starts again from the beginning of the array.

The following example illustrates how to set the color order for track changes in the DOCX Editor

{% tabs %}
{% highlight cshtml tabtitle="CSHTML" %}
{% include code-snippet/document-editor/asp-net-core/document-editor-container/track-changes-revision-colors/tagHelper %}
{% endhighlight %}
{% highlight c# tabtitle="Track-changes-revision-colors.cs" %}
{% include code-snippet/document-editor/asp-net-core/document-editor-container/track-changes-revision-colors/document-editor.cs %}
{% endhighlight %}
{% endtabs %}

## Filtering changes based on user

In DocumentEditor, we have built-in review panel in which we have provided support for filtering changes based on the user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,24 @@ container.documentEditor.selection.navigateNextRevision();
container.documentEditor.selection.navigatePreviousRevision();
```

## Custom Colors for Track Changes

You can set an array of colors to show track changes such as insertions and deletions in the DOCX editor.
Each author is assigned a color in order: the first author gets the first color, the second author gets the next, and so on.
If there are more authors than colors, the assignment starts again from the beginning of the array.

The following example illustrates how to set the color order for track changes in the DOCX Editor

{% tabs %}
{% highlight razor tabtitle="CSHTML" %}
{% include code-snippet/document-editor/asp-net-mvc/document-editor-container/track-changes-revision-colors/razor %}
{% endhighlight %}
{% highlight c# tabtitle="Track-changes-revision-colors.cs" %}
{% include code-snippet/document-editor/asp-net-mvc/document-editor-container/track-changes-revision-colors/document-editor.cs %}
{% endhighlight %}
{% endtabs %}


## Filtering changes based on user

The DOCX Editor has a built-in review panel that supports filtering changes by user.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public ActionResult Default()
{
return View();
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@Html.EJS().DocumentEditorContainer("container").EnableTrackChanges(true).DocumentEditorSettings("settings").Render()
<script>
var settings = { revisionSettings: { revisionColors: [ '#0e76b1', '#bb00ff', '#c14f16' ] } };
</script>

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<ejs-documenteditorcontainer id="container" documentEditorSettings="settings" height="590px" enableTrackChanges=true></ejs-documenteditorcontainer>
<script>
var settings = { revisionSettings: { revisionColors: [ '#0e76b1', '#bb00ff', '#c14f16' ] } };
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public ActionResult Default()
{
return View();
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@Html.EJS().DocumentEditorContainer("container").EnableTrackChanges(true).DocumentEditorSettings("settings").Render()
<script>
var settings = { revisionSettings: { revisionColors: [ '#0e76b1', '#bb00ff', '#c14f16' ] } };
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<ejs-documenteditorcontainer id="container" documentEditorSettings="settings" height="590px" enableTrackChanges=true></ejs-documenteditorcontainer>
<script>
var settings = { revisionSettings: { revisionColors: [ '#0e76b1', '#bb00ff', '#c14f16' ] } };
</script>