diff --git a/ej2-asp-core-mvc/code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs b/ej2-asp-core-mvc/code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs new file mode 100644 index 0000000000..e0c6166807 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs @@ -0,0 +1,12 @@ +public class HomeController : Controller +{ + + public ActionResult Index() + { + ViewBag.items = new[] { "CreateTable" }; + ViewBag.Table = new[] { + "TableHeader", "TableRows", "TableColumns", "TableCell", "-", "BackgroundColor", "TableRemove", "TableCellVerticalAlign", "Styles" + }; + return View(); + } +} diff --git a/ej2-asp-core-mvc/code-snippet/rich-text-editor/table-row-and-column-selection/razor b/ej2-asp-core-mvc/code-snippet/rich-text-editor/table-row-and-column-selection/razor new file mode 100644 index 0000000000..d31e8321e0 --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/rich-text-editor/table-row-and-column-selection/razor @@ -0,0 +1,36 @@ +@Html.EJS().RichTextEditor("table").QuickToolbarSettings(e => { e.Table((object)ViewBag.Table); }).ContentTemplate(@
+

Discover the Table's Powerful Features

A table can be created in the editor using either a keyboard shortcut or the toolbar. With the quick + toolbar, you can + perform table cell insert, delete, split, and merge operations. You can style the table cells using + background + colours and borders.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name
Age
Gender
Occupation
Selma Rose30FemaleEngineer
Robert
28MaleGraphic Designer
William
35MaleTeacher
+
).ToolbarSettings(e => { e.Items((object)ViewBag.items); }).Render() diff --git a/ej2-asp-core-mvc/code-snippet/rich-text-editor/table-row-and-column-selection/tagHelper b/ej2-asp-core-mvc/code-snippet/rich-text-editor/table-row-and-column-selection/tagHelper new file mode 100644 index 0000000000..630558280c --- /dev/null +++ b/ej2-asp-core-mvc/code-snippet/rich-text-editor/table-row-and-column-selection/tagHelper @@ -0,0 +1,40 @@ + + + + +

Discover the Table's Powerful Features

A table can be created in the editor using either a keyboard shortcut or the toolbar. With the quick + toolbar, you can + perform table cell insert, delete, split, and merge operations. You can style the table cells using + background + colours and borders.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name
Age
Gender
Occupation
Selma Rose30FemaleEngineer
Robert
28MaleGraphic Designer
William
35MaleTeacher
+
+
diff --git a/ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.MVC/table.md b/ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.MVC/table.md index 84bb8e7352..8b5c0e4d27 100644 --- a/ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.MVC/table.md +++ b/ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.MVC/table.md @@ -113,6 +113,53 @@ Using the quick toolbar, users can change the width, cell padding, and cell spac ![Rich Text Editor table settings](./images/table_properties.png) +## Table row and column selection + +The table row and column selection feature in our editor allows for intuitive and efficient table manipulation using both mouse and keyboard interactions. + +**Mouse interaction:** + +* Click and drag to select multiple rows or columns. +* Selected cells are highlighted with a distinct background color for better visibility. + +**Keyboard interaction:** + +* Use Shift + Arrow keys to extend the selection of rows or columns. +* Background color highlights selected cells, making it easy to see the current selection. + +![Rich Text Editor table row and column selection](./images/table_row_and_column_selection.png) + +**Table selection with backspace and delete keys:** + +* Press the Backspace key immediately after the table to select the entire table. +* Press the Delete key immediately before the table to select the entire table. + +![Rich Text Editor table selection](./images/table_selection.png) + +**Table content text formatting:** + +The text formatting feature in tables allows users to apply various styles to selected cells, enhancing the appearance and readability of data. This includes the application of headings, paragraphs, lists, and inline styles such as bold, italic, and strikethrough. Users can efficiently format multiple cells simultaneously by selecting entire rows or columns. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/rich-text-editor/table-row-and-column-selection/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Controller.cs" %} +{% include code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight c# tabtitle="Controller.cs" %} +{% include code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + ## Table cell merge and split The Rich Text Editor allows users to change the appearance of the tables by splitting or merging the table cells. diff --git a/ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.NETCORE/table.md b/ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.NETCORE/table.md index 313da866ec..8d9eefaf51 100644 --- a/ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.NETCORE/table.md +++ b/ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.NETCORE/table.md @@ -116,6 +116,56 @@ Using the quick toolbar, users can change the width, cell padding, and cell spac ![Rich Text Editor table settings](./images/table_properties.png) +## Table row and column selection + +The table row and column selection feature in our editor allows for intuitive and efficient table manipulation using both mouse and keyboard interactions. + +**Mouse interaction:** + +* Click and drag to select multiple rows or columns. +* Selected cells are highlighted with a distinct background color for better visibility. + +**Keyboard interaction:** + +* Use Shift + Arrow keys to extend the selection of rows or columns. +* Background color highlights selected cells, making it easy to see the current selection. + +![Rich Text Editor table row and column selection](./images/table_row_and_column_selection.png) + +**Table selection with backspace and delete keys:** + +* Press the Backspace key immediately after the table to select the entire table. +* Press the Delete key immediately before the table to select the entire table. + +![Rich Text Editor table selection](./images/table_selection.png) + +**Table content text formatting:** + +The text formatting feature in tables allows users to apply various styles to selected cells, enhancing the appearance and readability of data. This includes the application of headings, paragraphs, lists, and inline styles such as bold, italic, and strikethrough. Users can efficiently format multiple cells simultaneously by selecting entire rows or columns. + +{% if page.publishingplatform == "aspnet-core" %} + +{% tabs %} +{% highlight cshtml tabtitle="CSHTML" %} +{% include code-snippet/rich-text-editor/table-row-and-column-selection/tagHelper %} +{% endhighlight %} +{% highlight c# tabtitle="Controller.cs" %} +{% include code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs %} +{% endhighlight %} +{% endtabs %} + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +{% tabs %} +{% highlight razor tabtitle="CSHTML" %} +{% include code-snippet/rich-text-editor/table-row-and-column-selection/razor %} +{% endhighlight %} +{% highlight c# tabtitle="Controller.cs" %} +{% include code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs %} +{% endhighlight %} +{% endtabs %} +{% endif %} + ## Table cell merge and split The Rich Text Editor allows users to change the appearance of the tables by splitting or merging the table cells. diff --git a/ej2-asp-core-mvc/rich-text-editor/images/table_row_and_column_selection.png b/ej2-asp-core-mvc/rich-text-editor/images/table_row_and_column_selection.png new file mode 100644 index 0000000000..bfe16789d9 Binary files /dev/null and b/ej2-asp-core-mvc/rich-text-editor/images/table_row_and_column_selection.png differ diff --git a/ej2-asp-core-mvc/rich-text-editor/images/table_selection.png b/ej2-asp-core-mvc/rich-text-editor/images/table_selection.png new file mode 100644 index 0000000000..3da3018314 Binary files /dev/null and b/ej2-asp-core-mvc/rich-text-editor/images/table_selection.png differ