From 56d4920a9c0ed4b89c9f0040b60c1621c7ad3a07 Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Wed, 22 Jan 2025 18:19:36 +0530 Subject: [PATCH 1/5] 814887: Added Get content as plain text/rich text and corrected the naming for the content in Core and MVC --- .../document-editor-container/get-paragraph/razor | 6 ++++-- .../document-editor-container/get-paragraph/tagHelper | 6 ++++-- .../code-snippet/document-editor-container/get-word/razor | 4 +++- .../document-editor-container/get-word/tagHelper | 4 +++- .../document-editor/how-to/get-the-selected-content.md | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/get-paragraph/razor b/ej2-asp-core-mvc/code-snippet/document-editor-container/get-paragraph/razor index 0efbf1e5c5..2979d6865d 100644 --- a/ej2-asp-core-mvc/code-snippet/document-editor-container/get-paragraph/razor +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/get-paragraph/razor @@ -11,7 +11,9 @@ // To select the current paragraph in document container.documentEditor.selection.selectParagraph(); - // To get the selected content as sfdt - var selectedContent = container.documentEditor.selection.sfdt; + // To get the selected content as text + var selectedContentText = container.documentEditor.selection.text; + // To get the selected content as SFDT (rich text) + var selectedContentSFDT = container.documentEditor.selection.sfdt; } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/get-paragraph/tagHelper b/ej2-asp-core-mvc/code-snippet/document-editor-container/get-paragraph/tagHelper index 5e87f95a83..9cf6c5e9f1 100644 --- a/ej2-asp-core-mvc/code-snippet/document-editor-container/get-paragraph/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/get-paragraph/tagHelper @@ -13,7 +13,9 @@ // To select the current paragraph in document container.documentEditor.selection.selectParagraph(); - // To get the selected content as sfdt - var selectedContent = container.documentEditor.selection.sfdt; + // To get the selected content as text + var selectedContentText = container.documentEditor.selection.text; + // To get the selected content as SFDT (rich text) + var selectedContentSFDT = container.documentEditor.selection.sfdt; } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/get-word/razor b/ej2-asp-core-mvc/code-snippet/document-editor-container/get-word/razor index 98f75c0595..69a7a6ea6d 100644 --- a/ej2-asp-core-mvc/code-snippet/document-editor-container/get-word/razor +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/get-word/razor @@ -12,6 +12,8 @@ container.documentEditor.selection.selectCurrentWord(); // To get the selected content as text - var selectedContent = container.documentEditor.selection.text; + var selectedContentText = container.documentEditor.selection.text; + // To get the selected content as SFDT (rich text) + var selectedContentSFDT = container.documentEditor.selection.sfdt; } \ No newline at end of file diff --git a/ej2-asp-core-mvc/code-snippet/document-editor-container/get-word/tagHelper b/ej2-asp-core-mvc/code-snippet/document-editor-container/get-word/tagHelper index 7569edbf72..59352fa775 100644 --- a/ej2-asp-core-mvc/code-snippet/document-editor-container/get-word/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/document-editor-container/get-word/tagHelper @@ -14,6 +14,8 @@ container.documentEditor.selection.selectCurrentWord(); // To get the selected content as text - var selectedContent = container.documentEditor.selection.text; + var selectedContentText = container.documentEditor.selection.text; + // To get the selected content as SFDT (rich text) + var selectedContentSFDT = container.documentEditor.selection.sfdt; } \ No newline at end of file diff --git a/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md b/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md index c822f07a24..5813c64745 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md +++ b/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md @@ -46,7 +46,7 @@ You can add the following custom options using this API, ## Get the selected content as SFDT (rich text) -You can use `sfdt` API to get the selected content as plain text from React Document Editor component. +You can use `sfdt` API to get the selected content as rich text from React Document Editor component. {% if page.publishingplatform == "aspnet-core" %} From 9e99e590eb5d7200362cec96595885d0cea52b23 Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Wed, 22 Jan 2025 18:46:22 +0530 Subject: [PATCH 2/5] 817044: Resolved Tag issue --- .../document-editor/how-to/get-current-word.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md b/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md index 3a7c3fe742..c6a3a5066c 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md +++ b/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md @@ -25,7 +25,9 @@ The following example code illustrates how to select and get the current word as {% include code-snippet/document-editor-container/get-word/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Get-word.cs" %} -{% endhighlight %}{% endtabs %} +{% endhighlight %} +{% code-snippet/document-editor-container/get-word/document-editor.cs %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -34,12 +36,12 @@ The following example code illustrates how to select and get the current word as {% include code-snippet/document-editor-container/get-word/razor %} {% endhighlight %} {% highlight c# tabtitle="Get-word.cs" %} -{% endhighlight %}{% endtabs %} +{% code-snippet/document-editor-container/get-word/document-editor.cs %} +{% endhighlight %} +{% endtabs %} {% endif %} -To get the bookmark content as SFDT (rich text), check this [`link`](../../document-editor/how-to/get-the-selected-content/#get-the-selected-content-as-sfdt-rich-text) - ## Select and get the paragraph in current cursor position You can use [`selectParagraph`] API in selection module to select the current paragraph at cursor position and use [`text`] API or [`sfdt`] API to get the selected content as plain text or SFDT from Document Editor component. @@ -53,7 +55,9 @@ The following example code illustrates how to select and get the current paragra {% include code-snippet/document-editor-container/get-paragraph/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Get-paragraph.cs" %} -{% endhighlight %}{% endtabs %} +{% code-snippet/document-editor-container/get-paragraph/document-editor.cs %} +{% endhighlight %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -62,5 +66,7 @@ The following example code illustrates how to select and get the current paragra {% include code-snippet/document-editor-container/get-paragraph/razor %} {% endhighlight %} {% highlight c# tabtitle="Get-paragraph.cs" %} -{% endhighlight %}{% endtabs %} +{% code-snippet/document-editor-container/get-paragraph/document-editor.cs %} +{% endhighlight %} +{% endtabs %} {% endif %} From a1d9c61ca9792ab436f3e79348aaac8abb5a80e4 Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Thu, 23 Jan 2025 09:38:21 +0530 Subject: [PATCH 3/5] 814887: Resolved Spelling error --- .../document-editor/how-to/get-the-selected-content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md b/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md index 5813c64745..618411fd7f 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md +++ b/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md @@ -72,5 +72,5 @@ You can use `sfdt` API to get the selected content as rich text from React Docum You can add the following custom options using this API, * Save or export the selected content as SFDT file. -* Get the content of a bookmark in Word document as SFDT by selecting a bookmark using `selectbookmark` API. +* Get the content of a bookmark in Word document as SFDT by selecting a bookmark using `select bookmark` API. * Create template content that can be inserted to multiple documents in cursor position using `paste` API. \ No newline at end of file From 0f5b1c9da38507da3e50abf093c1b9a9715008ed Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Thu, 23 Jan 2025 10:21:29 +0530 Subject: [PATCH 4/5] 814887: Resolved Front Matter Issue --- ej2-asp-core-mvc/document-editor/how-to/get-current-word.md | 2 +- .../document-editor/how-to/get-the-selected-content.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md b/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md index c6a3a5066c..e8e4b3ac4d 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md +++ b/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md @@ -1,6 +1,6 @@ --- layout: post -title: Select and retrieve current word and Paragraph in ##Platform_Name## Document Editor Component +title: get selected current word/Paragraph in ##Platform_Name## Document Editor Component | Syncfusion description: Learn how to select and retrieve current word and Paragraph from the Syncfusion ##Platform_Name## Document Editor Component platform: ej2-asp-core-mvc control: Get The Current Word And Paragrapgh diff --git a/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md b/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md index 618411fd7f..7a4dfaeec2 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md +++ b/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md @@ -1,6 +1,6 @@ --- layout: post -title: Get The Selected Content in ##Platform_Name## Document Editor Component +title: Get Selected Content in ##Platform_Name## Document Editor Component | Syncfusion description: Learn here all about get the selected content in Syncfusion ##Platform_Name## Document Editor component of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Get The Selected Content From cf92f84a6026bfc5d1488513ceb0d90d47b90c41 Mon Sep 17 00:00:00 2001 From: kavitha Muralitharan Date: Thu, 23 Jan 2025 10:41:35 +0530 Subject: [PATCH 5/5] 814887: Resolved Front matter and tag issue --- .../document-editor/how-to/get-current-word.md | 2 +- .../how-to/get-the-selected-content.md | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md b/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md index e8e4b3ac4d..36ffa42310 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md +++ b/ej2-asp-core-mvc/document-editor/how-to/get-current-word.md @@ -1,6 +1,6 @@ --- layout: post -title: get selected current word/Paragraph in ##Platform_Name## Document Editor Component | Syncfusion +title: Get current Word/Para in ##Platform_Name## Document editor control | Syncfusion description: Learn how to select and retrieve current word and Paragraph from the Syncfusion ##Platform_Name## Document Editor Component platform: ej2-asp-core-mvc control: Get The Current Word And Paragrapgh diff --git a/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md b/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md index 7a4dfaeec2..c45d931f0f 100644 --- a/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md +++ b/ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md @@ -24,7 +24,9 @@ You can use `text` API to get the selected content as plain text from React Docu {% include code-snippet/document-editor-container/get-text/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Get-text.cs" %} -{% endhighlight %}{% endtabs %} +{% code-snippet/document-editor-container/get-text/document-editor.cs %} +{% endhighlight %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -33,7 +35,9 @@ You can use `text` API to get the selected content as plain text from React Docu {% include code-snippet/document-editor-container/get-text/razor %} {% endhighlight %} {% highlight c# tabtitle="Get-text.cs" %} -{% endhighlight %}{% endtabs %} +{% code-snippet/document-editor-container/get-text/document-editor.cs %} +{% endhighlight %} +{% endtabs %} {% endif %} @@ -55,7 +59,9 @@ You can use `sfdt` API to get the selected content as rich text from React Docum {% include code-snippet/document-editor-container/get-sfdt/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Get-sfdt.cs" %} -{% endhighlight %}{% endtabs %} +{% code-snippet/document-editor-container/get-sfdt/document-editor.cs %} +{% endhighlight %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -64,7 +70,9 @@ You can use `sfdt` API to get the selected content as rich text from React Docum {% include code-snippet/document-editor-container/get-sfdt/razor %} {% endhighlight %} {% highlight c# tabtitle="Get-sfdt.cs" %} -{% endhighlight %}{% endtabs %} +{% code-snippet/document-editor-container/get-sfdt/document-editor.cs %} +{% endhighlight %} +{% endtabs %} {% endif %}