Class RichTextEditorFormat
A class used for configuring the paragraph format properties in the SfRichTextEditor component. Provides customization options for the paragraph formatting tool in the editor's toolbar.
Inherited Members
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class RichTextEditorFormat : DropDownButtonItemBase
Remarks
You can configure the paragraph format tool appearance by specifying the appropriate properties, allowing for versatile text formatting capabilities within the editor.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorToolbarSettings Items = "@Tools" />
<RichTextEditorFormat Items="FormatItems" Default="Paragraph" Width="70px"/>
</SfRichTextEditor>
@code {
private List<ToolbarItemModel> Tools = new List<ToolbarItemModel>()
{
new ToolbarItemModel() { Command = ToolbarCommand.Formats }
};
private List<DropDownItemModel> FormatItems = new List<DropDownItemModel>()
{
new DropDownItemModel() { Text = "Paragraph", Value = "P" },
new DropDownItemModel() { Text = "Heading 1", Value = "H1" },
new DropDownItemModel() { Text = "Heading 2", Value = "H2" }
};
}
Constructors
RichTextEditorFormat()
Declaration
public RichTextEditorFormat()
Properties
Items
Gets or sets the paragraph formats displayed under the Format 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 available paragraph format options. |
Overrides
Remarks
This collection allows users to define paragraph structures such as headings and body text, facilitating organized and aesthetically pleasing text arrangements.
Width
Gets or sets the width of the paragraph format dropdown button in the SfRichTextEditor toolbar.
Declaration
public override string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the width of the dropdown button. The default value is |
Overrides
Remarks
This property affects how the paragraph format button fits within the toolbar, ensuring a sleek and efficient interface design that accommodates user interactions smoothly.
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 dropdown type.
Declaration
protected override string GetDropDownType()
Returns
Type | Description |
---|---|
System.String | Returns the dropdown type. |
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. |