alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class RichTextEditorFontSize

    A class used for configuring the font size properties in the SfRichTextEditor component. This feature allows adjusting the font size options available in the toolbar.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    SfBaseComponent
    DropDownButtonItemBase
    RichTextEditorFontSize
    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
    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 RichTextEditorFontSize : DropDownButtonItemBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    You can configure the font size tool appearance by specifying appropriate values for the corresponding properties, facilitating customizable and varied text formatting options in the editor.

    Examples
    @using Syncfusion.Blazor.RichTextEditor;
    <SfRichTextEditor>
        <RichTextEditorToolbarSettings Items = "@Tools" />
        <RichTextEditorFontSize Items="FontSizeItems" Default="10pt" Width="40px"/>
    </SfRichTextEditor>
    @code {
        private List<ToolbarItemModel> Tools = new List<ToolbarItemModel>()
        {
            new ToolbarItemModel() { Command = ToolbarCommand.FontSize }
        };
       private List<DropDownItemModel> FontSizeItems = new List<DropDownItemModel>()
       {
           new DropDownItemModel() { Text = "8 pt", Value = "8pt" },
           new DropDownItemModel() { Text = "10 pt", Value = "10pt" },
           new DropDownItemModel() { Text = "12 pt", Value = "12pt" }
       };
    }

    Constructors

    RichTextEditorFontSize()

    Declaration
    public RichTextEditorFontSize()

    Properties

    Items

    Gets or sets the font sizes displayed under the Font Size tool button in the SfRichTextEditor toolbar.

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

    A List<T> containing available font size options.

    Overrides
    DropDownButtonItemBase.Items
    Remarks

    The collection enables users to select their preferred text size directly from the toolbar, thus providing a seamless customization experience.

    Width

    Gets or sets the width of the font size dropdown button in the SfRichTextEditor toolbar.

    Declaration
    [Parameter]
    public override string? Width { get; set; }
    Property Value
    Type Description
    string

    A string representing the width of the dropdown button. The default is 60px.

    Overrides
    DropDownButtonItemBase.Width
    Remarks

    This property influences the visual spacing and alignment of the font size tool within the toolbar, ensuring it complements the overall editor layout.

    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 font size.

    Declaration
    protected override string GetDropDownType()
    Returns
    Type Description
    string

    Returns the font size.

    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