alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class RichTextEditorLineHeight

    Represents the configuration for the line height dropdown in the SfRichTextEditor toolbar. Defines the predefined line heights that populate the Line Height dropdown. Supports customization of default value,custom values from pasted content, and dropdown items.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SfBaseComponent
    DropDownButtonItemBase
    RichTextEditorLineHeight
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    DropDownButtonItemBase.Default
    DropDownButtonItemBase.OnInitializedAsync()
    DropDownButtonItemBase.OnParametersSetAsync()
    DropDownButtonItemBase.Parent
    DropDownButtonItemBase.Width
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    SfBaseComponent.Dispose()
    SfBaseComponent.GetEffectivePlatform()
    SfBaseComponent.GetMainComponentPlatform()
    SfBaseComponent.IsMainLicenseComponent()
    SfBaseComponent.LicenseContext
    SfBaseComponent.OnAfterRenderAsync(bool)
    SfBaseComponent.OnObservableChange(string, object, bool, NotifyCollectionChangedEventArgs)
    SfBaseComponent.ValidateLicense()
    Namespace: Syncfusion.Blazor.RichTextEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class RichTextEditorLineHeight : DropDownButtonItemBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    This example demonstrates configuring the line height dropdown within the Rich Text Editor.

    Examples
    @using Syncfusion.Blazor.RichTextEditor
    <SfRichTextEditor>
        <RichTextEditorToolbarSettings Items="@Tools" />
        <RichTextEditorLineHeight Items="@LineHeightItems" Default="1.5" SupportAllValues="true" />
    </SfRichTextEditor>
    @code {
        private List<ToolbarItemModel> Tools = new()
        {
            new ToolbarItemModel() { Command = ToolbarCommand.LineHeight }
        };
        private List<DropDownItemModel> LineHeightItems = new()
        {
            new DropDownItemModel { Text = "Default", Value = "" },
            new DropDownItemModel { Text = "1", Value = "1" },
            new DropDownItemModel { Text = "1.5", Value = "1.5" },
            new DropDownItemModel { Text = "2", Value = "2" }
        };
    }

    Constructors

    RichTextEditorLineHeight()

    Declaration
    public RichTextEditorLineHeight()

    Properties

    Items

    Specifies the set of line height options displayed in the dropdown.

    Declaration
    [Parameter]
    public override List<DropDownItemModel>? Items { get; set; }
    Property Value
    Type Description
    List<DropDownItemModel>

    An IEnumerable<T> containing the line height options. The default value is a predefined collection: [{ Text: "Default", Value: "" }, { Text: "1", Value: "1" }, { Text: "1.15", Value: "1.15" }, { Text: "1.5", Value: "1.5" }, { Text: "2", Value: "2" }, { Text: "2.5", Value: "2.5" }, { Text: "3", Value: "3" }].

    Overrides
    DropDownButtonItemBase.Items
    Remarks

    Each item should have Text for display and Value for the CSS line-height (numeric string).

    Custom items can be added; order affects dropdown appearance. Empty collection results in no dropdown options.

    For performance, limit to 10-15 items to avoid UI lag in large toolbars.

    Examples

    Customizes the items collection.

    @code {
        private List<DropDownItemModel> LineHeightItems = new List<DropDownItemModel>
        {
            new DropDownItemModel { Text = "Normal", Value = "1.15" },
            new DropDownItemModel { Text = "Double", Value = "2" }
        };
    }
    <RichTextEditorLineHeight Items="@LineHeightItems" />

    SupportAllValues

    Indicates whether to support all numeric line height values from pasted or imported content.

    Declaration
    [Parameter]
    public bool SupportAllValues { get; set; }
    Property Value
    Type Description
    bool

    A bool indicating support for custom line heights. The default value is false.

    Remarks

    When true, non-predefined values are retained and shown as "Custom: {value}" in the dropdown.

    Useful for preserving formatting from external sources; may increase dropdown complexity with many unique values.

    No thread safety issues; property is set during component initialization.

    Methods

    Dispose(bool)

    Dispose unmanaged resources in the Syncfusion Blazor component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    Boolean value to dispose the object.

    Overrides
    DropDownButtonItemBase.Dispose(bool)

    GetDropDownType()

    Used to get the line height type for dropdown configuration.

    Declaration
    protected override string GetDropDownType()
    Returns
    Type Description
    string

    Returns the line height dictionary key.

    Overrides
    DropDownButtonItemBase.GetDropDownType()

    PropertyChangeHandler(KeyCollection)

    Used to handle the dynamic property changes.

    Declaration
    protected override void PropertyChangeHandler(Dictionary<string, object>.KeyCollection keys)
    Parameters
    Type Name Description
    Dictionary<string, object>.KeyCollection keys

    Specifies the changed keys.

    Overrides
    DropDownButtonItemBase.PropertyChangeHandler(Dictionary<string, object>.KeyCollection)

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved