Skip to content

Commit 00145f7

Browse files
authored
Merge pull request #3012 from syncfusion-content/889648-tble-docs
documentation(889648): To add documentation for the feature table cell and column selection in the Rich Text Editor is all platforms.
2 parents c92734c + b3077f5 commit 00145f7

File tree

7 files changed

+185
-0
lines changed

7 files changed

+185
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public class HomeController : Controller
2+
{
3+
4+
public ActionResult Index()
5+
{
6+
ViewBag.items = new[] { "CreateTable" };
7+
ViewBag.Table = new[] {
8+
"TableHeader", "TableRows", "TableColumns", "TableCell", "-", "BackgroundColor", "TableRemove", "TableCellVerticalAlign", "Styles"
9+
};
10+
return View();
11+
}
12+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@Html.EJS().RichTextEditor("table").QuickToolbarSettings(e => { e.Table((object)ViewBag.Table); }).ContentTemplate(@<div>
2+
<h2>Discover the Table's Powerful Features</h2><p>A table can be created in the editor using either a keyboard shortcut or the toolbar. With the quick
3+
toolbar, you can
4+
perform table cell insert, delete, split, and merge operations. You can style the table cells using
5+
background
6+
colours and borders.</p><table class="e-rte-table" style="width: 100%; min-width: 0px; height: 151px">
7+
<thead>
8+
<tr>
9+
<th><span>Name</span><br/></th>
10+
<th><span>Age</span><br/></th>
11+
<th><span>Gender</span><br/></th>
12+
<th><span>Occupation</span><br/></th>
13+
</tr>
14+
</thead>
15+
<tbody>
16+
<tr>
17+
<td>Selma Rose</td>
18+
<td>30</td>
19+
<td>Female</td>
20+
<td><span>Engineer</span><br/></td>
21+
</tr>
22+
<tr>
23+
<td><span>Robert</span><br/></td>
24+
<td>28</td>
25+
<td>Male</td>
26+
<td><span>Graphic Designer</span></td>
27+
</tr>
28+
<tr>
29+
<td><span>William</span><br/></td>
30+
<td>35</td>
31+
<td>Male</td>
32+
<td>Teacher</td>
33+
</tr>
34+
</tbody>
35+
</table>
36+
</div>).ToolbarSettings(e => { e.Items((object)ViewBag.items); }).Render()
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<ejs-richtexteditor id="table">
2+
<e-richtexteditor-toolbarsettings items="@ViewBag.items"></e-richtexteditor-toolbarsettings>
3+
<e-richtexteditor-quicktoolbarsettings table="@ViewBag.table"></e-richtexteditor-quicktoolbarsettings>
4+
<e-content-template>
5+
<h2>Discover the Table's Powerful Features</h2><p>A table can be created in the editor using either a keyboard shortcut or the toolbar. With the quick
6+
toolbar, you can
7+
perform table cell insert, delete, split, and merge operations. You can style the table cells using
8+
background
9+
colours and borders.</p><table class="e-rte-table" style="width: 100%; min-width: 0px; height: 151px">
10+
<thead>
11+
<tr>
12+
<th><span>Name</span><br/></th>
13+
<th><span>Age</span><br/></th>
14+
<th><span>Gender</span><br/></th>
15+
<th><span>Occupation</span><br/></th>
16+
</tr>
17+
</thead>
18+
<tbody>
19+
<tr>
20+
<td>Selma Rose</td>
21+
<td>30</td>
22+
<td>Female</td>
23+
<td><span>Engineer</span><br/></td>
24+
</tr>
25+
<tr>
26+
<td><span>Robert</span><br/></td>
27+
<td>28</td>
28+
<td>Male</td>
29+
<td><span>Graphic Designer</span></td>
30+
</tr>
31+
<tr>
32+
<td><span>William</span><br/></td>
33+
<td>35</td>
34+
<td>Male</td>
35+
<td>Teacher</td>
36+
</tr>
37+
</tbody>
38+
</table>
39+
</e-content-template>
40+
</ejs-richtexteditor>

ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.MVC/table.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,53 @@ Using the quick toolbar, users can change the width, cell padding, and cell spac
113113

114114
![Rich Text Editor table settings](./images/table_properties.png)
115115

116+
## Table row and column selection
117+
118+
The table row and column selection feature in our editor allows for intuitive and efficient table manipulation using both mouse and keyboard interactions.
119+
120+
**Mouse interaction:**
121+
122+
* Click and drag to select multiple rows or columns.
123+
* Selected cells are highlighted with a distinct background color for better visibility.
124+
125+
**Keyboard interaction:**
126+
127+
* Use <kbd>Shift</kbd> + <kbd>Arrow keys</kbd> to extend the selection of rows or columns.
128+
* Background color highlights selected cells, making it easy to see the current selection.
129+
130+
![Rich Text Editor table row and column selection](./images/table_row_and_column_selection.png)
131+
132+
**Table selection with backspace and delete keys:**
133+
134+
* Press the <kbd>Backspace</kbd> key immediately after the table to select the entire table.
135+
* Press the <kbd>Delete</kbd> key immediately before the table to select the entire table.
136+
137+
![Rich Text Editor table selection](./images/table_selection.png)
138+
139+
**Table content text formatting:**
140+
141+
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.
142+
143+
{% if page.publishingplatform == "aspnet-core" %}
144+
145+
{% tabs %}
146+
{% highlight cshtml tabtitle="CSHTML" %}
147+
{% include code-snippet/rich-text-editor/table-row-and-column-selection/tagHelper %}
148+
{% endhighlight %}
149+
{% highlight c# tabtitle="Controller.cs" %}
150+
{% include code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs %}
151+
{% endhighlight %}
152+
{% endtabs %}
153+
154+
{% elsif page.publishingplatform == "aspnet-mvc" %}
155+
156+
{% tabs %}
157+
{% highlight c# tabtitle="Controller.cs" %}
158+
{% include code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs %}
159+
{% endhighlight %}
160+
{% endtabs %}
161+
{% endif %}
162+
116163
## Table cell merge and split
117164

118165
The Rich Text Editor allows users to change the appearance of the tables by splitting or merging the table cells.

ej2-asp-core-mvc/rich-text-editor/EJ2_ASP.NETCORE/table.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,56 @@ Using the quick toolbar, users can change the width, cell padding, and cell spac
116116

117117
![Rich Text Editor table settings](./images/table_properties.png)
118118

119+
## Table row and column selection
120+
121+
The table row and column selection feature in our editor allows for intuitive and efficient table manipulation using both mouse and keyboard interactions.
122+
123+
**Mouse interaction:**
124+
125+
* Click and drag to select multiple rows or columns.
126+
* Selected cells are highlighted with a distinct background color for better visibility.
127+
128+
**Keyboard interaction:**
129+
130+
* Use <kbd>Shift</kbd> + <kbd>Arrow keys</kbd> to extend the selection of rows or columns.
131+
* Background color highlights selected cells, making it easy to see the current selection.
132+
133+
![Rich Text Editor table row and column selection](./images/table_row_and_column_selection.png)
134+
135+
**Table selection with backspace and delete keys:**
136+
137+
* Press the <kbd>Backspace</kbd> key immediately after the table to select the entire table.
138+
* Press the <kbd>Delete</kbd> key immediately before the table to select the entire table.
139+
140+
![Rich Text Editor table selection](./images/table_selection.png)
141+
142+
**Table content text formatting:**
143+
144+
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.
145+
146+
{% if page.publishingplatform == "aspnet-core" %}
147+
148+
{% tabs %}
149+
{% highlight cshtml tabtitle="CSHTML" %}
150+
{% include code-snippet/rich-text-editor/table-row-and-column-selection/tagHelper %}
151+
{% endhighlight %}
152+
{% highlight c# tabtitle="Controller.cs" %}
153+
{% include code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs %}
154+
{% endhighlight %}
155+
{% endtabs %}
156+
157+
{% elsif page.publishingplatform == "aspnet-mvc" %}
158+
159+
{% tabs %}
160+
{% highlight razor tabtitle="CSHTML" %}
161+
{% include code-snippet/rich-text-editor/table-row-and-column-selection/razor %}
162+
{% endhighlight %}
163+
{% highlight c# tabtitle="Controller.cs" %}
164+
{% include code-snippet/rich-text-editor/table-row-and-column-selection/controller.cs %}
165+
{% endhighlight %}
166+
{% endtabs %}
167+
{% endif %}
168+
119169
## Table cell merge and split
120170

121171
The Rich Text Editor allows users to change the appearance of the tables by splitting or merging the table cells.
Loading
Loading

0 commit comments

Comments
 (0)