menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class FormatPainterOptions - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class FormatPainterOptions

    Provides configuration options for the Format Painter feature.

    Inheritance
    System.Object
    FormatPainterOptions
    Namespace: Syncfusion.Blazor.RichTextEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class FormatPainterOptions : Object

    Constructors

    FormatPainterOptions()

    Declaration
    public FormatPainterOptions()

    Properties

    AllowedFormats

    Specifies the element selectors from which formats can be copied.

    Declaration
    public string AllowedFormats { get; set; }
    Property Value
    Type Description
    System.String

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

    Remarks

    The AllowedFormats property defines a semicolon-separated string of HTML element selectors (e.g., b, i, span) from which the Format Painter copies formatting. This includes common formatting tags, structural elements, and inline styles or attributes such as style or class. Wildcards (e.g., ()[]{*}) allow matching all elements with specific attributes.
    Customizing this property ensures consistent formatting behavior by restricting the feature to specified elements. Only valid HTML selectors should be used to avoid runtime errors. Example: "b; i; span[style]" restricts formatting to bold, italic, and styled span elements.

    DeniedFormats

    Specifies the element selectors from which formats cannot be copied.

    Declaration
    public string DeniedFormats { get; set; }
    Property Value
    Type Description
    System.String

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

    Remarks

    The DeniedFormats property specifies a semicolon-separated list of HTML element selectors (e.g., b, i, span) that the Format Painter must exclude from copying. This includes elements with inline styles or attributes like class. By default, this property is null, meaning no restrictions are applied.
    Wildcards such as ()[]{*} may be used to target elements with specific attributes.
    Only valid HTML selectors should be included to prevent runtime errors. Example: "b; i" blocks bold and italic formatting from being copied.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved