Skip to content

380577: Added documentation for toggle track pane #2895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 23, 2024
Merged
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
@@ -0,0 +1,12 @@
<div>
@Html.EJS().DocumentEditorContainer("container").Created("onCreated").EnableToolbar(true).EnableTrackChanges(true).Render()
</div>

<script>
var documenteditor;
var container;
var documenteditorElement = document.getElementById("container");
container = documenteditorElement.ej2_instances[0];
container.documentEditor.showRevisions = true; // To show revisions pane
container.documentEditor.showRevisions = false; // To hide revisions pane
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<ejs-documenteditorcontainer id="container" serviceUrl="/api/DocumentEditor/" enableToolbar=true enableTrackChanges=true height="590px"></ejs-documenteditorcontainer>

<script>
var documenteditor;
var container;
var documenteditorElement = document.getElementById("container");
container = documenteditorElement.ej2_instances[0];
container.documentEditor.showRevisions = true; // To show revisions pane
container.documentEditor.showRevisions = false; // To hide revisions pane
</script>
25 changes: 25 additions & 0 deletions ej2-asp-core-mvc/document-editor/track-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,31 @@ The following example demonstrates how to enable track changes.
{% endhighlight %}{% endtabs %}
{% endif %}

## Show/Hide Revisions Pane

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.

The following example code illustrates how to show/hide the revisions pane.

{% if page.publishingplatform == "aspnet-core" %}

{% tabs %}
{% highlight cshtml tabtitle="CSHTML" %}
{% include code-snippet/document-editor-container/toggle-track-pane/tagHelper %}
{% endhighlight %}
{% highlight c# tabtitle="Track-changes-only.cs" %}
{% endhighlight %}{% endtabs %}

{% elsif page.publishingplatform == "aspnet-mvc" %}

{% tabs %}
{% highlight razor tabtitle="CSHTML" %}
{% include code-snippet/document-editor-container/toggle-track-pane/razor %}
{% endhighlight %}
{% highlight c# tabtitle="Track-changes-only.cs" %}
{% endhighlight %}{% endtabs %}
{% endif %}

## Get all tracked revisions

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