menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RichTextEditorFontSize - API Reference

    Show / Hide Table of Contents

    Class RichTextEditorFontSize

    A class used for configuring the font size properties in the SfRichTextEditor component.

    Inheritance
    System.Object
    DropDownButtonItemBase
    RichTextEditorFontSize
    Inherited Members
    DropDownButtonItemBase.OnInitializedAsync()
    DropDownButtonItemBase.OnParametersSetAsync()
    DropDownButtonItemBase.Parent
    DropDownButtonItemBase.Default
    Namespace: Syncfusion.Blazor.RichTextEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class RichTextEditorFontSize : DropDownButtonItemBase
    Remarks

    You can configure the font size tool appearance by specifying the value for the corresponding property.

    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 fonts that diaply under the Font Size tool button in the SfRichTextEditor toolbar.

    Declaration
    public override List<DropDownItemModel> Items { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<DropDownItemModel>

    DropDownItemModel

    Overrides
    DropDownButtonItemBase.Items

    Width

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

    Declaration
    public override string Width { get; set; }
    Property Value
    Type Description
    System.String

    This property contains wisth value as string. The default value is 35px.

    Overrides
    DropDownButtonItemBase.Width

    Methods

    Dispose(Boolean)

    Dispose unmanaged resources in the Syncfusion Blazor component.

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

    Boolean value to dispose the object.

    Overrides
    DropDownButtonItemBase.Dispose(Boolean)

    GetDropDownType()

    Used to get the font size.

    Declaration
    protected override string GetDropDownType()
    Returns
    Type Description
    System.String

    Returns the font size.

    Overrides
    DropDownButtonItemBase.GetDropDownType()

    PropertyChangeHandler(Dictionary<String, Object>.KeyCollection)

    Used to handle the dynamic property changes.

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

    Specifies the changed keys.

    Overrides
    DropDownButtonItemBase.PropertyChangeHandler(Dictionary<String, Object>.KeyCollection)
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved