diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/restrict-content/razor b/ej2-asp-core-mvc/code-snippet/document-editor-container/restrict-content/razor new file mode 100644 index 0000000000..bc085887a4 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/restrict-content/razor @@ -0,0 +1,43 @@ +@Html.EJS().DocumentEditorContainer("container").Created("onCreated").SelectionChange("onSelectionChanged").EnableToolbar(true).Render() + + diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/restrict-content/tagHelper b/ej2-asp-core-mvc/code-snippet/document-editor-container/restrict-content/tagHelper new file mode 100644 index 0000000000..b0cad7baf0 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/restrict-content/tagHelper @@ -0,0 +1,45 @@ +
+ +
+ + diff --git a/ej2-asp-core-mvc/document-editor/how-to/restrict-particular-content.md b/ej2-asp-core-mvc/document-editor/how-to/restrict-particular-content.md new file mode 100644 index 0000000000..f84135830f --- /dev/null +++ b/ej2-asp-core-mvc/document-editor/how-to/restrict-particular-content.md @@ -0,0 +1,46 @@ +--- +layout: post +title: Restrict Particular Content in ##Platform_Name## Document Editor Component | Syncfusion +description: Learn how to Restrict Particular Content from the Syncfusion ##Platform_Name## Document Editor Component +platform: ej2-asp-core-mvc +control: Restrict Particular Content +publishingplatform: ##Platform_Name## +documentation: ug +--- + +# Restrict Particular Content in Document editor control + +In this article, we are going to see how to restrict particular content during selection. + +## Following are the steps to restrict a specific content when selecting the desired content: + +1. Select any content you wish to make non-editable. +2. Add a button. A bookmark with a unique ID beginning with "Placeholder_" will be created for the selected content. +3. If the selection falls within this bookmark, the control will be set to read-only. +4. The selected content is now restricted and cannot be edited (non-editable). + + +The following example code illustrates how to restrict particular content during selection. + + + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/document-editor-container/restrict-content/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Restrict-content.cs" %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/document-editor-container/restrict-content/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Restrict-content.cs" %} +{% endhighlight %} +{% endtabs %} +{% endif %} diff --git a/ej2-asp-core-toc.html b/ej2-asp-core-toc.html index 8b7453844b..88598b08d0 100644 --- a/ej2-asp-core-toc.html +++ b/ej2-asp-core-toc.html @@ -997,6 +997,7 @@
  • Auto save the document in Server
  • Auto save the document in AWS S3
  • Retrieve the Bookmark and Whole document content
  • +
  • Restrict Particular Content
  • Select and Get the Current Word and Paragraph
  • Insert page number and navigate to specific page
  • Move the selection to specific position in Document
  • diff --git a/ej2-asp-mvc-toc.html b/ej2-asp-mvc-toc.html index bce0cc241a..fa8b8dc778 100644 --- a/ej2-asp-mvc-toc.html +++ b/ej2-asp-mvc-toc.html @@ -945,6 +945,7 @@
  • Auto save the document in Server
  • Auto save the document in AWS S3
  • Retrieve the Bookmark and Whole document content
  • +
  • Restrict Particular Content
  • Select and Get the Current Word and Paragraph
  • Insert page number and navigate to specific page
  • Move the selection to specific position in Document