Skip to content

Commit 56d4920

Browse files
814887: Added Get content as plain text/rich text and corrected the naming for the content in Core and MVC
1 parent 15465d2 commit 56d4920

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

ej2-asp-core-mvc/code-snippet/document-editor-container/get-paragraph/razor

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
// To select the current paragraph in document
1212
container.documentEditor.selection.selectParagraph();
1313

14-
// To get the selected content as sfdt
15-
var selectedContent = container.documentEditor.selection.sfdt;
14+
// To get the selected content as text
15+
var selectedContentText = container.documentEditor.selection.text;
16+
// To get the selected content as SFDT (rich text)
17+
var selectedContentSFDT = container.documentEditor.selection.sfdt;
1618
}
1719
</script>

ej2-asp-core-mvc/code-snippet/document-editor-container/get-paragraph/tagHelper

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
// To select the current paragraph in document
1414
container.documentEditor.selection.selectParagraph();
1515

16-
// To get the selected content as sfdt
17-
var selectedContent = container.documentEditor.selection.sfdt;
16+
// To get the selected content as text
17+
var selectedContentText = container.documentEditor.selection.text;
18+
// To get the selected content as SFDT (rich text)
19+
var selectedContentSFDT = container.documentEditor.selection.sfdt;
1820
}
1921
</script>

ej2-asp-core-mvc/code-snippet/document-editor-container/get-word/razor

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
container.documentEditor.selection.selectCurrentWord();
1313

1414
// To get the selected content as text
15-
var selectedContent = container.documentEditor.selection.text;
15+
var selectedContentText = container.documentEditor.selection.text;
16+
// To get the selected content as SFDT (rich text)
17+
var selectedContentSFDT = container.documentEditor.selection.sfdt;
1618
}
1719
</script>

ej2-asp-core-mvc/code-snippet/document-editor-container/get-word/tagHelper

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
container.documentEditor.selection.selectCurrentWord();
1515

1616
// To get the selected content as text
17-
var selectedContent = container.documentEditor.selection.text;
17+
var selectedContentText = container.documentEditor.selection.text;
18+
// To get the selected content as SFDT (rich text)
19+
var selectedContentSFDT = container.documentEditor.selection.sfdt;
1820
}
1921
</script>

ej2-asp-core-mvc/document-editor/how-to/get-the-selected-content.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ You can add the following custom options using this API,
4646

4747
## Get the selected content as SFDT (rich text)
4848

49-
You can use `sfdt` API to get the selected content as plain text from React Document Editor component.
49+
You can use `sfdt` API to get the selected content as rich text from React Document Editor component.
5050

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

0 commit comments

Comments
 (0)