From 2c57dccc634d11f5debcd198c48ad4e1f1ea00a6 Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Mon, 3 Feb 2025 19:29:11 +0530 Subject: [PATCH 1/4] 933810:Added the enableTrackChanges feature document-level settings Content information in Core and MVC --- .../toggle-track-pane/document-editor.cs | 5 ++++ .../track-changes-default/document-editor.cs | 5 ++++ .../track-changes-default/razor | 13 ++++++++ .../track-changes-default/tagHelper | 9 ++++++ .../document-editor.cs | 5 ++++ .../track-changes/document-editor.cs | 5 ++++ .../document-editor/track-changes.md | 30 +++++++++++++++++++ 7 files changed, 72 insertions(+) create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor-container/toggle-track-pane/document-editor.cs create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/document-editor.cs create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/razor create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/tagHelper create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-only-protect/document-editor.cs create mode 100644 ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes/document-editor.cs diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/toggle-track-pane/document-editor.cs b/ej2-asp-core-mvc/code-snippet/document-editor-container/toggle-track-pane/document-editor.cs new file mode 100644 index 0000000000..cca48eedf9 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/toggle-track-pane/document-editor.cs @@ -0,0 +1,5 @@ + public ActionResult Default() + { + return View(); + } + diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/document-editor.cs b/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/document-editor.cs new file mode 100644 index 0000000000..cca48eedf9 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/document-editor.cs @@ -0,0 +1,5 @@ + public ActionResult Default() + { + return View(); + } + diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/razor b/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/razor new file mode 100644 index 0000000000..33dcd7df80 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/razor @@ -0,0 +1,13 @@ +
+ @Html.EJS().DocumentEditorContainer("container").documentChange("onDocChange").EnableToolbar(true).Render() +
+ + + \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/tagHelper b/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/tagHelper new file mode 100644 index 0000000000..98110a0409 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-default/tagHelper @@ -0,0 +1,9 @@ + + diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-only-protect/document-editor.cs b/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-only-protect/document-editor.cs new file mode 100644 index 0000000000..cca48eedf9 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes-only-protect/document-editor.cs @@ -0,0 +1,5 @@ + public ActionResult Default() + { + return View(); + } + diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes/document-editor.cs b/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes/document-editor.cs new file mode 100644 index 0000000000..cca48eedf9 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/track-changes/document-editor.cs @@ -0,0 +1,5 @@ + public ActionResult Default() + { + return View(); + } + diff --git a/ej2-asp-core-mvc/document-editor/track-changes.md b/ej2-asp-core-mvc/document-editor/track-changes.md index 8baa3f5213..c689ac7b2d 100644 --- a/ej2-asp-core-mvc/document-editor/track-changes.md +++ b/ej2-asp-core-mvc/document-editor/track-changes.md @@ -23,6 +23,7 @@ The following example demonstrates how to enable track changes. {% include code-snippet/document-editor-container/track-changes/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} +{% include code-snippet/document-editor-container/track-changes/document-editor.cs %} {% endhighlight %}{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -32,9 +33,34 @@ The following example demonstrates how to enable track changes. {% include code-snippet/document-editor-container/track-changes/razor %} {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} +{% include code-snippet/document-editor-container/track-changes/document-editor.cs %} {% endhighlight %}{% endtabs %} {% endif %} +>Track changes are document level settings. When opening a document, if the document does not have track changes enabled, then enableTrackChanges will be disabled even if we set enableTrackChanges={true} in the initial rendering. If you want to enable track changes for all the documents, then we recommend enabling track changes during the document change event. The following example demonstrates how to enable Track changes for the all the Document while Opening. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/document-editor-container/track-changes-default/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Track-changes-default.cs" %} +{% include code-snippet/document-editor-container/track-changes-default/document-editor.cs %} +{% endhighlight % +}{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/document-editor-container/track-changes-default/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Track-changes-default.cs" %} +{% include code-snippet/document-editor-container/track-changes-default/document-editor.cs %} +{% 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. @@ -48,6 +74,7 @@ The following example code illustrates how to show/hide the revisions pane. {% include code-snippet/document-editor-container/toggle-track-pane/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} +{% include code-snippet/document-editor-container/toggle-track-pane/document-editor.cs %} {% endhighlight %}{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -57,6 +84,7 @@ The following example code illustrates how to show/hide the revisions pane. {% include code-snippet/document-editor-container/toggle-track-pane/razor %} {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} +{% include code-snippet/document-editor-container/toggle-track-pane/document-editor.cs %} {% endhighlight %}{% endtabs %} {% endif %} @@ -148,6 +176,7 @@ The following example code illustrates how to enforce and stop protection in Doc {% include code-snippet/document-editor-container/track-changes-only-protect/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} +{% include code-snippet/document-editor-container/track-changes-only-protect/document-editor.cs %} {% endhighlight %}{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -157,6 +186,7 @@ The following example code illustrates how to enforce and stop protection in Doc {% include code-snippet/document-editor-container/track-changes-only-protect/razor %} {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} +{% include code-snippet/document-editor-container/track-changes-only-protect/document-editor.cs %} {% endhighlight %}{% endtabs %} {% endif %} From b452f13c7cf8e3ecb38f1d92bfcae1042161468e Mon Sep 17 00:00:00 2001 From: Kavitha Muralitharan <98306850+KAVITHAMURALITHARAN@users.noreply.github.com> Date: Tue, 4 Feb 2025 18:59:46 +0530 Subject: [PATCH 2/4] 933810: Updated Review changes --- ej2-asp-core-mvc/document-editor/track-changes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ej2-asp-core-mvc/document-editor/track-changes.md b/ej2-asp-core-mvc/document-editor/track-changes.md index c689ac7b2d..c6ed04e343 100644 --- a/ej2-asp-core-mvc/document-editor/track-changes.md +++ b/ej2-asp-core-mvc/document-editor/track-changes.md @@ -37,7 +37,7 @@ The following example demonstrates how to enable track changes. {% endhighlight %}{% endtabs %} {% endif %} ->Track changes are document level settings. When opening a document, if the document does not have track changes enabled, then enableTrackChanges will be disabled even if we set enableTrackChanges={true} in the initial rendering. If you want to enable track changes for all the documents, then we recommend enabling track changes during the document change event. The following example demonstrates how to enable Track changes for the all the Document while Opening. +>Track changes are document level settings. When opening a document, if the document does not have track changes enabled, then enableTrackChanges will be disabled even if we set enableTrackChanges = true in the initial rendering. If you want to enable track changes for all the documents, then we recommend enabling track changes during the document change event. The following example demonstrates how to enable Track changes for the all the Document while Opening. {% if page.publishingplatform == "aspnet-core" %} @@ -194,4 +194,4 @@ Tracked changes only protection can be enabled in UI by using [Restrict Editing ![Enable track changes only protection](images/tracked-changes.png) -N> In enforce Protection method, first parameter denotes password and second parameter denotes protection type. Possible values of protection type are `NoProtection |ReadOnly |FormFieldsOnly |CommentsOnly |RevisionsOnly`. In stop protection method, parameter denotes the password. \ No newline at end of file +N> In enforce Protection method, first parameter denotes password and second parameter denotes protection type. Possible values of protection type are `NoProtection |ReadOnly |FormFieldsOnly |CommentsOnly |RevisionsOnly`. In stop protection method, parameter denotes the password. From 99bdc170c97931af012f5de2dfc86ed469c90221 Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Tue, 4 Feb 2025 19:15:15 +0530 Subject: [PATCH 3/4] 933810: Resolved Tag issue --- .../document-editor/track-changes.md | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/ej2-asp-core-mvc/document-editor/track-changes.md b/ej2-asp-core-mvc/document-editor/track-changes.md index c689ac7b2d..172eee6669 100644 --- a/ej2-asp-core-mvc/document-editor/track-changes.md +++ b/ej2-asp-core-mvc/document-editor/track-changes.md @@ -24,7 +24,8 @@ The following example demonstrates how to enable track changes. {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} {% include code-snippet/document-editor-container/track-changes/document-editor.cs %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -34,7 +35,8 @@ The following example demonstrates how to enable track changes. {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} {% include code-snippet/document-editor-container/track-changes/document-editor.cs %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% endif %} >Track changes are document level settings. When opening a document, if the document does not have track changes enabled, then enableTrackChanges will be disabled even if we set enableTrackChanges={true} in the initial rendering. If you want to enable track changes for all the documents, then we recommend enabling track changes during the document change event. The following example demonstrates how to enable Track changes for the all the Document while Opening. @@ -47,8 +49,8 @@ The following example demonstrates how to enable track changes. {% endhighlight %} {% highlight c# tabtitle="Track-changes-default.cs" %} {% include code-snippet/document-editor-container/track-changes-default/document-editor.cs %} -{% endhighlight % -}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -75,7 +77,8 @@ The following example code illustrates how to show/hide the revisions pane. {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} {% include code-snippet/document-editor-container/toggle-track-pane/document-editor.cs %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -85,7 +88,8 @@ The following example code illustrates how to show/hide the revisions pane. {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} {% include code-snippet/document-editor-container/toggle-track-pane/document-editor.cs %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% endif %} ## Get all tracked revisions @@ -177,7 +181,8 @@ The following example code illustrates how to enforce and stop protection in Doc {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} {% include code-snippet/document-editor-container/track-changes-only-protect/document-editor.cs %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -187,7 +192,8 @@ The following example code illustrates how to enforce and stop protection in Doc {% endhighlight %} {% highlight c# tabtitle="Track-changes-only.cs" %} {% include code-snippet/document-editor-container/track-changes-only-protect/document-editor.cs %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% endtabs %} {% endif %} Tracked changes only protection can be enabled in UI by using [Restrict Editing pane](../document-editor/document-management#restrict-editing-pane/) From 6927d7d91f557bf8d77a14f0107aaa5a909a5a5f Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Tue, 4 Feb 2025 19:17:02 +0530 Subject: [PATCH 4/4] 933810:Resolved tag issue --- ej2-asp-core-mvc/document-editor/track-changes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ej2-asp-core-mvc/document-editor/track-changes.md b/ej2-asp-core-mvc/document-editor/track-changes.md index 547b8f50f5..cd536ab510 100644 --- a/ej2-asp-core-mvc/document-editor/track-changes.md +++ b/ej2-asp-core-mvc/document-editor/track-changes.md @@ -200,4 +200,4 @@ Tracked changes only protection can be enabled in UI by using [Restrict Editing ![Enable track changes only protection](images/tracked-changes.png) -N> In enforce Protection method, first parameter denotes password and second parameter denotes protection type. Possible values of protection type are `NoProtection |ReadOnly |FormFieldsOnly |CommentsOnly |RevisionsOnly`. In stop protection method, parameter denotes the password. +N> In enforce Protection method, first parameter denotes password and second parameter denotes protection type. Possible values of protection type are `NoProtection |ReadOnly |FormFieldsOnly |CommentsOnly |RevisionsOnly`. In stop protection method, parameter denotes the password. \ No newline at end of file