Class RichTextEditorFontColor
A class used for configuring the font color properties in the SfRichTextEditor component.
Inherited Members
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class RichTextEditorFontColor : ColorItemBase
Remarks
Configure the font color tool appearance by specifying the value for the corresponding property. This enables users to define default color settings and customize the color selection in the editor's toolbar.
Examples
In the following code example, configure the Default
, ColorCode
, and ModeSwitcher
properties added using the RichTextEditorFontColor tag directive.
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorToolbarSettings Items = "@Tools" />
<RichTextEditorFontColor ColorCode="@ColorList" ModeSwitcher="true" Default="#a5a5a5"/>
</SfRichTextEditor>
@code {
private List<ToolbarItemModel> Tools = new List<ToolbarItemModel>()
{
new ToolbarItemModel() { Command = ToolbarCommand.BackgroundColor }
};
private Dictionary<string, string[]> ColorList = new Dictionary<string, string[]>()
{
{ "Custom", new string[]
{
string.Empty, "#000000", "#e7e6e6", "#44546a", "#4472c4", "#ed7d31", "#a5a5a5", "#ffc000", "#70ad47", "#ff0000"
}
}
};
}
Constructors
RichTextEditorFontColor()
Declaration
public RichTextEditorFontColor()
Properties
Default
Gets or sets the default font color for the typed text in the editor.
Declaration
public override string Default { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the color of the selected text. The default value is |
Overrides
Remarks
The default color is applied to text typed in the Rich Text Editor. To customize the appearance, alter this property value.
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
GetColorType()
Used to get the font color.
Declaration
protected override string GetColorType()
Returns
Type | Description |
---|---|
System.String | Returns the font color. |
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. |