Class RichTextEditorBackgroundColor
A class used for configuring the background color properties in the SfRichTextEditor component.
Inherited Members
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class RichTextEditorBackgroundColor : ColorItemBase
Remarks
Configure the background color tool appearance by specifying the value for the corresponding property.
Examples
In the following code example, configure the Default
, ColorCode
, and ModeSwitcher
properties added using the RichTextEditorBackgroundColor tag directive.
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorToolbarSettings Items = "@Tools" />
< RichTextEditorBackgroundColor 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
RichTextEditorBackgroundColor()
Declaration
public RichTextEditorBackgroundColor()
Properties
Default
Gets or sets the default background color and the typed content in the editor.
Declaration
public override string Default { get; set; }
Property Value
Type | Description |
---|---|
System.String | The color of the selected content background color. The default value is |
Overrides
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 dropdown type.
Declaration
protected override string GetColorType()
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. |