Class RichTextEditorFontFamily
A class used for configuring the font family properties in the SfRichTextEditor component.
Inherited Members
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class RichTextEditorFontFamily : DropDownButtonItemBase
Remarks
You can configure the font family tool appearance by specifying the value for the corresponding property. This feature allows selecting different font families from the dropdown in the editor's toolbar.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorToolbarSettings Items = "@Tools" />
<RichTextEditorFontFamily Items="FontFamilyItems" Width="70px" Default="Tahoma"/>
</SfRichTextEditor>
@code {
private List<ToolbarItemModel> Tools = new List<ToolbarItemModel>()
{
new ToolbarItemModel() { Command = ToolbarCommand.FontName }
};
private List<DropDownItemModel> FontFamilyItems = new List<DropDownItemModel>()
{
new DropDownItemModel() { Text = "Impact", Value = "Impact,Charcoal,sans-serif" },
new DropDownItemModel() { Text = "Tahoma", Value = "Tahoma,Geneva,sans-serif" }
};
}
Constructors
RichTextEditorFontFamily()
Declaration
public RichTextEditorFontFamily()
Properties
Items
Gets or sets the fonts that display under the Font Family tool button in the SfRichTextEditor toolbar.
Declaration
public override List<DropDownItemModel> Items { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<DropDownItemModel> | A System.Collections.Generic.List<> containing font options that can be selected as the font family. |
Overrides
Remarks
This collection is used to specify the list of fonts available in the toolbar dropdown, allowing users to set their preferred font family.
Width
Gets or sets the width of the font family dropdown button in the SfRichTextEditor toolbar.
Declaration
public override string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String containing the width value of the dropdown button. The default value is |
Overrides
Remarks
This value determines the visual width of the dropdown button to ensure consistent layout in the toolbar.
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
GetDropDownType()
Used to get the font family.
Declaration
protected override string GetDropDownType()
Returns
Type | Description |
---|---|
System.String | Returns the font family. |
Overrides
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. |