alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class RichTextEditorFontColor

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

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    ColorItemBase
    RichTextEditorFontColor
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ColorItemBase.ColorCode
    ColorItemBase.Columns
    ColorItemBase.Mode
    ColorItemBase.ModeSwitcher
    ColorItemBase.OnInitializedAsync()
    ColorItemBase.OnParametersSetAsync()
    ColorItemBase.Parent
    ColorItemBase.ShowRecentColors
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.RichTextEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class RichTextEditorFontColor : ColorItemBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    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
    [Parameter]
    public override string? Default { get; set; }
    Property Value
    Type Description
    string

    A string representing the color of the selected text. The default value is #ff0000.

    Overrides
    ColorItemBase.Default
    Remarks

    The default color is applied to text typed in the Rich Text Editor. To customize the appearance, alter this property value.

    Methods

    Dispose(bool)

    Dispose unmanaged resources in the Syncfusion Blazor component.

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

    Boolean value to dispose the object.

    Overrides
    ColorItemBase.Dispose(bool)

    GetColorType()

    Used to get the font color.

    Declaration
    protected override string GetColorType()
    Returns
    Type Description
    string

    Returns the font color.

    Overrides
    ColorItemBase.GetColorType()

    PropertyChangeHandler(KeyCollection)

    Used to handle the dynamic property changes.

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

    Specifies the changed keys.

    Overrides
    ColorItemBase.PropertyChangeHandler(Dictionary<string, object>.KeyCollection)

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved