alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class RichTextEditorFormatPainterSettings

    Represents configuration settings for the Format Painter feature in a rich text editor.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    RichTextEditorFormatPainterSettings
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    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 RichTextEditorFormatPainterSettings : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Remarks

    This class defines the allowed and denied format selectors for copying and applying styles using the Format Painter tool.

    Use this class within the SfRichTextEditor component to customize Format Painter behavior.

    The settings can be overridden at runtime using the FormatPainterParams.Options parameter in the ExecuteCommandAsync method.

    Examples

    This example demonstrates how to configure the RichTextEditorFormatPainterSettings for a Format Painter in a SfRichTextEditor component.

    @using Syncfusion.Blazor.RichTextEditor; 
    <SfRichTextEditor> 
        <RichTextEditorToolbarSettings Items="@Tools" /> 
        <RichTextEditorFormatPainterSettings AllowedFormats="b; em; strong; span" DeniedFormats="img; a" /> 
    </SfRichTextEditor> 
    @code { 
        private List<ToolbarItemModel> Tools = new List<ToolbarItemModel> 
        { 
            new ToolbarItemModel { Command = ToolbarCommand.FormatPainter } 
        }; 
    }

    Constructors

    RichTextEditorFormatPainterSettings()

    Declaration
    public RichTextEditorFormatPainterSettings()

    Properties

    AllowedFormats

    Specifies the element selectors from which formats can be copied.

    Declaration
    [Parameter]
    public string? AllowedFormats { get; set; }
    Property Value
    Type Description
    string

    A string of allowed format selectors, defaulting to a comprehensive list of HTML tags and attributes.

    Remarks

    This parameter defines the default allowed formats for the Format Painter. It can be overridden by the AllowedFormats property in FormatPainterParams.Options during command execution in ExecuteCommandAsync method.

    Examples
    @using Syncfusion.Blazor.RichTextEditor; 
    <SfRichTextEditor> 
        <RichTextEditorToolbarSettings Items="@Tools" /> 
        <RichTextEditorFormatPainterSettings AllowedFormats="b; em; strong; span" /> 
    </SfRichTextEditor> 
    @code { 
        private List<ToolbarItemModel> Tools = new List<ToolbarItemModel> 
        { 
            new ToolbarItemModel { Command = ToolbarCommand.FormatPainter } 
        }; 
    }

    DeniedFormats

    Specifies the element selectors from which formats cannot be copied.

    Declaration
    [Parameter]
    public string? DeniedFormats { get; set; }
    Property Value
    Type Description
    string

    A string of denied format selectors, defaulting to null (no restrictions).

    Remarks

    This parameter sets the default denied formats for the Format Painter. It can be overridden by the DeniedFormats property in FormatPainterParams.Options when executing a command.

    Examples
    @using Syncfusion.Blazor.RichTextEditor; 
    <SfRichTextEditor> 
        <RichTextEditorToolbarSettings Items="@Tools" /> 
        <RichTextEditorFormatPainterSettings DeniedFormats="img; a" /> 
    </SfRichTextEditor> 
    @code { 
        private List<ToolbarItemModel> Tools = new List<ToolbarItemModel> 
        { 
            new ToolbarItemModel { Command = ToolbarCommand.FormatPainter } 
        }; 
    }

    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
    OwningComponentBase.Dispose(bool)

    OnInitializedAsync()

    Method invoked when the component is ready to start.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    ComponentBase.OnInitializedAsync()

    OnParametersSetAsync()

    Method invoked when the component has received parameters from its parent.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing any asynchronous operation.

    Overrides
    ComponentBase.OnParametersSetAsync()

    Implements

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