Skip to content

Commit f74960f

Browse files
Merge pull request #2895 from syncfusion-content/380577-hide-track-pane
380577: Added documentation for toggle track pane
2 parents ac69f4f + cf1b2c0 commit f74960f

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<div>
2+
@Html.EJS().DocumentEditorContainer("container").Created("onCreated").EnableToolbar(true).EnableTrackChanges(true).Render()
3+
</div>
4+
5+
<script>
6+
var documenteditor;
7+
var container;
8+
var documenteditorElement = document.getElementById("container");
9+
container = documenteditorElement.ej2_instances[0];
10+
container.documentEditor.showRevisions = true; // To show revisions pane
11+
container.documentEditor.showRevisions = false; // To hide revisions pane
12+
</script>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<ejs-documenteditorcontainer id="container" serviceUrl="/api/DocumentEditor/" enableToolbar=true enableTrackChanges=true height="590px"></ejs-documenteditorcontainer>
2+
3+
<script>
4+
var documenteditor;
5+
var container;
6+
var documenteditorElement = document.getElementById("container");
7+
container = documenteditorElement.ej2_instances[0];
8+
container.documentEditor.showRevisions = true; // To show revisions pane
9+
container.documentEditor.showRevisions = false; // To hide revisions pane
10+
</script>

ej2-asp-core-mvc/document-editor/track-changes.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,31 @@ The following example demonstrates how to enable track changes.
3535
{% endhighlight %}{% endtabs %}
3636
{% endif %}
3737

38+
## Show/Hide Revisions Pane
39+
40+
The Show/Hide Revisions Pane feature in the Document Editor allows users to toggle the visibility of the revisions pane, providing flexibility in managing tracked changes within the document.
41+
42+
The following example code illustrates how to show/hide the revisions pane.
43+
44+
{% if page.publishingplatform == "aspnet-core" %}
45+
46+
{% tabs %}
47+
{% highlight cshtml tabtitle="CSHTML" %}
48+
{% include code-snippet/document-editor-container/toggle-track-pane/tagHelper %}
49+
{% endhighlight %}
50+
{% highlight c# tabtitle="Track-changes-only.cs" %}
51+
{% endhighlight %}{% endtabs %}
52+
53+
{% elsif page.publishingplatform == "aspnet-mvc" %}
54+
55+
{% tabs %}
56+
{% highlight razor tabtitle="CSHTML" %}
57+
{% include code-snippet/document-editor-container/toggle-track-pane/razor %}
58+
{% endhighlight %}
59+
{% highlight c# tabtitle="Track-changes-only.cs" %}
60+
{% endhighlight %}{% endtabs %}
61+
{% endif %}
62+
3863
## Get all tracked revisions
3964

4065
The following example demonstrate how to get all tracked revision from current document.

0 commit comments

Comments
 (0)