You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ej2-asp-core-mvc/code-snippet/rich-text-editor/line-height-cs1/controller.cs
+27-12Lines changed: 27 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -5,33 +5,48 @@ public ActionResult Index()
5
5
ViewBag.value=@"<p>The Rich Text Editor allows users to apply line-height (line-spacing) to elements like paragraphs, lists, headings, and table cells. You can set line height using a dedicated dropdown in the toolbar, and it is applied as inline style to the selected blocks. This feature makes text easier to read and gives better control over content layout.</p><p><b> Key features:</b></p> <ul> <li><p>Provides a <b>Line Height</b> dropdown in the toolbar for easy access.</p></li><li><p>Supports applying line-height to paragraphs, headings, lists, and table cells.</p></li><li><p>Applies line-height as inline styles for consistent and precise text rendering.</p></li><li><p>Ensures consistent appearance across devices and print layouts.</p></li><li><p>Improves text readability and overall document aesthetics.</p></li></ul>";
# Text Formatting in the ##Platform_Name## Rich Text Editor Control
11
+
# Text Formatting in the ASP.NET Core Rich Text Editor Control
12
12
13
13
## Basic text styling
14
14
@@ -463,6 +463,68 @@ While the toolbar does not provide a direct method to apply blockquote formattin
463
463
{% endtabs %}
464
464
{% endif %}
465
465
466
+
## Line Height
467
+
468
+
The Rich Text Editor supports line height feature which allows users to adjust the vertical spacing between lines of text. To change the line height, select the text you want to modify and click the Line Height icon in the toolbar. Choose from the available spacing options to apply the desired vertical spacing. This feature is especially useful for creating visually appealing paragraphs and ensuring consistent formatting across your document.
469
+
470
+
### Built-in line height
471
+
472
+
You can add the `LineHeight` tool to the toolbar in the Rich Text Editor using [toolbarSettings.items](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditor.html#items) property.
473
+
474
+
{% if page.publishingplatform == "aspnet-core" %}
475
+
476
+
{% tabs %}
477
+
{% highlight cshtml tabtitle="CSHTML" %}
478
+
{% include code-snippet/rich-text-editor/line-height/tagHelper %}
479
+
{% endhighlight %}
480
+
{% highlight c# tabtitle="Controller.cs" %}
481
+
{% include code-snippet/rich-text-editor/line-height/controller.cs %}
{% include code-snippet/rich-text-editor/line-height/razor %}
490
+
{% endhighlight %}
491
+
{% highlight c# tabtitle="Controller.cs" %}
492
+
{% include code-snippet/rich-text-editor/line-height/controller.cs %}
493
+
{% endhighlight %}
494
+
{% endtabs %}
495
+
{% endif %}
496
+
497
+
The Rich Text Editor comes with a pre-configured set of [`lineHeight`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditor.html#lineheight) property.
498
+
499
+
### Custom line height
500
+
501
+
The Rich Text Editor supports custom line height along with the existing line height dropdown list. To add additional line height to the line height dropdown, you can configure the items field of the [`lineHeight`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditor.html#lineheight) property. This allows you to extend the available line height options beyond the default selection.
502
+
503
+
The [`supportAllValues`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.RichTextEditor.RichTextEditor.html#supportAllValues) setting enables the line height dropdown to display and retain line-height values that are not part of the predefined options. When `supportAllValues` property is turned on, the dropdown will show the current line-height value from the selection, even if that value is not present in the configured lineHeights array. By default, `supportAllValues` will be set to false.
504
+
505
+
{% if page.publishingplatform == "aspnet-core" %}
506
+
507
+
{% tabs %}
508
+
{% highlight cshtml tabtitle="CSHTML" %}
509
+
{% include code-snippet/rich-text-editor/line-height-cs1/tagHelper %}
510
+
{% endhighlight %}
511
+
{% highlight c# tabtitle="Controller.cs" %}
512
+
{% include code-snippet/rich-text-editor/line-height-cs1/controller.cs %}
{% include code-snippet/rich-text-editor/line-height-cs1/razor %}
521
+
{% endhighlight %}
522
+
{% highlight c# tabtitle="Controller.cs" %}
523
+
{% include code-snippet/rich-text-editor/line-height-cs1/controller.cs %}
524
+
{% endhighlight %}
525
+
{% endtabs %}
526
+
{% endif %}
527
+
466
528
## Horizontal line
467
529
468
530
The Rich Text Editor enables users to insert horizontal dividers using the `HorizontalLine` tool available in the toolbar. Horizontal lines (<hr>) help visually separate sections of content, enhancing readability and structural clarity.
0 commit comments