{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "rich-text-editor-format-painter",
  "framework": "blazor",
  "type": "registry:component",
  "component": "RichTextEditor",
  "variant": "format-painter",
  "dependencies": [
    "Syncfusion.Blazor.RichTextEditor"
  ],
  "description": "Rich text editor with a file browser for inserting server images from available storage.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 3 (v35.1.37)",
    "license": "commercial-or-community",
    "licenseNote": "The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md",
    "requiresLicenseKey": true,
    "requiresServerEndpoint": false,
    "platformIndex": "https://ai.syncfusion.com/blazor/llms.txt",
    "skillPack": "syncfusion/blazor-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/blazor/rich-text-editor-format-painter.md"
  },
  "files": [
    {
      "target": "src/components/rich-text-editor-format-painter/RichTextEditor.razor",
      "content": "@page \"/rich-text-editor/format-painter\"\n@using Syncfusion.Blazor.Popups\n@using Syncfusion.Blazor.RichTextEditor\n@using Syncfusion.Blazor.DropDowns\n@using System.ComponentModel.DataAnnotations;\n@using System.Text.RegularExpressions\n<div class=\"col-lg-8 control-section\" id=\"rte-format-painter\">\n    <SfRichTextEditor @ref=\"EditorRef\">\n        <RichTextEditorToolbarSettings Items=\"@tools\" />\n        <RichTextEditorFormatPainterSettings AllowedFormats=\"@allowedFormats\" DeniedFormats=\"@deniedFormats\" />\n        <h3>Format Painter in Rich Text Editor</h3><p>The <strong data-start=\"50\" data-end=\"68\">Format Painter</strong> allows you to quickly copy and apply text formatting within the editor, saving time and ensuring consistency.</p><h5>How to Use Format Painter?</h5>\n        <ul><li><strong>Select the text</strong> with the formatting you want to copy.</li><li>Click the <strong>Format Painter</strong> button (paintbrush icon) in the toolbar.</li><li>The cursor changes to a <strong>paintbrush</strong> icon.</li><li><strong>Click and drag</strong> over the text where you want to apply the copied format.</li><li>Release the mouse button, and the formatting will be applied.</li></ul><h5>Why Use Format Painter?</h5>\n        <ul><li><strong>Saves time</strong> when formatting large documents.</li><li><strong>Ensures consistency</strong> in text styles. </li><li><strong>Easy to use</strong> for writers, editors, and content creators.</li></ul>\n    </SfRichTextEditor>\n</div>\n<PropertyPanel ControlSecClass=\"col-lg-8\" CollapseChanged=\"CollapseChange\">\n    <div id=\"property\" title=\"Properties\" class=\"property-panel-table\">\n        <table id=\"property\" title=\"Properties\">\n            <tbody>\n                <tr>\n                    <td>\n                        <div>Allowed Formats</div>\n                    </td>\n                    <td>\n                        <div>\n                            <input type=\"text\" @bind=\"@allowedFormatText\" class=\"e-input\" @onblur=\"allowedFormatsPainterBlur\" placeholder=\"span; strong; em; sup; sub; code;\" />\n                        </div>\n                    </td>\n                </tr>\n                <tr>\n                    <td>\n                        <div>Denied Formats</div>\n                    </td>\n                    <td>\n                        <div>\n                            <input type=\"text\" @bind=\"@deniedFormatText\" class=\"e-input\" @onblur=\"deniedFormatPainterBlur\" placeholder=\"span(important)[title]{background-color,color};\" />\n                        </div>\n                    </td>\n                </tr>\n            </tbody>\n        </table>\n    </div>\n</PropertyPanel>\n<style>\n    .sf-property-section {\n        padding-top: 20px;\n    }\n</style>\n@code {\n    private SfRichTextEditor? EditorRef;\n    private string? allowedFormatText { get; set; }\n    private string? allowedFormats { get; set; } = \"b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; ol; ul; li; pre;\";\n    private string? deniedFormats { get; set; } = null;\n    private string? deniedFormatText { get; set; }\n    private void allowedFormatsPainterBlur ( Microsoft.AspNetCore.Components.Web.FocusEventArgs e )\n    {\n        if (!string.IsNullOrWhiteSpace (this.allowedFormatText))\n        {\n            this.allowedFormats = this.allowedFormatText;\n        }\n        else\n        {\n            this.allowedFormats = \"b; em; font; sub; sup; kbd; i; s; u; code; strong; span; p; div; h1; h2; h3; h4; h5; h6; blockquote; table; thead; tbody; tr; td; th; ol; ul; li; pre; (*)[*]{*}\";\n        }\n    }\n    private void deniedFormatPainterBlur ( Microsoft.AspNetCore.Components.Web.FocusEventArgs e )\n    {\n        if (!string.IsNullOrWhiteSpace (this.deniedFormatText))\n        {\n            this.deniedFormats = this.deniedFormatText;\n        }\n        else\n        {\n            this.deniedFormats = null;\n        }\n    }\n    private List<ToolbarItemModel> tools = new List<ToolbarItemModel> ()\n    {\n        new ToolbarItemModel() { Command = ToolbarCommand.FormatPainter },\n        new ToolbarItemModel() { Command = ToolbarCommand.Bold },\n        new ToolbarItemModel() { Command = ToolbarCommand.Italic },\n        new ToolbarItemModel() { Command = ToolbarCommand.Underline },\n        new ToolbarItemModel() { Command = ToolbarCommand.StrikeThrough },\n        new ToolbarItemModel() { Command = ToolbarCommand.FontName }\n    };\n    protected override async Task OnAfterRenderAsync(bool firstRender)\n    {\n        if (firstRender)\n        {\n            await base.OnAfterRenderAsync(firstRender);\n            StateHasChanged();\n            this.EditorRef?.RefreshUIAsync();\n        }\n    }\n    private void CollapseChange(bool collapse)\n    {\n        StateHasChanged();\n        this.EditorRef?.RefreshUIAsync();\n    }\n}\n"
    }
  ]
}