{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "rich-text-editor-paste-from-ms-word",
  "framework": "aspnet-core",
  "type": "registry:component",
  "component": "RichTextEditor",
  "variant": "paste-from-ms-word",
  "dependencies": [
    "Syncfusion.AspNetCore.RichTextEditor",
    "Syncfusion.AspNetCore.Inputs",
    "Syncfusion.AspNetCore.DropDowns"
  ],
  "description": "Rich text editor configured to clean and preserve formatting when pasting content from Word.",
  "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/aspnet-core/llms.txt",
    "skillPack": "syncfusion/aspnetcore-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/aspnet-core/rich-text-editor-paste-from-ms-word.md"
  },
  "files": [
    {
      "target": "src/components/rich-text-editor-paste-from-ms-word/rich-text-editor.cshtml",
      "content": "@page\n@namespace aspnet_core.RichTextEditor.PasteFromMsWord\n@model EJ2CoreSampleBrowser.RichTextEditor.PasteFromMsWord.PasteFromMsWordModel\n@using Syncfusion.EJ2\n@using Syncfusion.EJ2.DropDowns\n\n    <div class=\"control-section\">\n        <div class=\"content-wrapper\" id=\"all-option-sample\">\n            <div class=\"col-lg-8\">\n                <ejs-richtexteditor id=\"pasteCleanUp\">\n                    <e-richtexteditor-pastecleanupsettings prompt=\"true\"></e-richtexteditor-pastecleanupsettings>\n                    <e-content-template>\n                        <h4>Paste Cleanup in Rich Text Editor</h4>\n                        <p>The Rich Text Editor can clean up formatted content when you paste from Word, Google Docs, or web pages.</p>\n                    </e-content-template>\n                </ejs-richtexteditor>\n            </div>\n            <div class=\"col-lg-4 property-section\">\n                <table id=\"property\" title=\"Properties\">\n                    <tr>\n                        <td><div>Format Option</div></td>\n                        <td>\n                            <ejs-dropdownlist id=\"formatOption\" dataSource=\"@Model.Options\" index=\"0\" popupHeight=\"200px\" change=\"formatChange\">\n                                <e-dropdownlist-fields text=\"Format\" value=\"Id\"></e-dropdownlist-fields>\n                            </ejs-dropdownlist>\n                        </td>\n                    </tr>\n                    <tr>\n                        <td><div>Denied Tags</div></td>\n                        <td>\n                            <ejs-textbox id=\"deniedTags\" placeholder=\"img[!href]\" blur=\"deniedTagsChange\"></ejs-textbox>\n                        </td>\n                    </tr>\n                </table>\n            </div>\n        </div>\n    </div>\n\n    <script>\n        var rteObj;\n        document.addEventListener('DOMContentLoaded', function () {\n            rteObj = document.getElementById('pasteCleanUp').ej2_instances[0];\n        });\n        function formatChange(args) {\n            var value = args.value;\n            if (value === 'Prompt') { rteObj.pasteCleanupSettings.prompt = true; }\n            else if (value === 'Plain Text') { rteObj.pasteCleanupSettings.prompt = false; rteObj.pasteCleanupSettings.plainText = true; }\n            else if (value === 'Keep Format') { rteObj.pasteCleanupSettings.prompt = false; rteObj.pasteCleanupSettings.plainText = false; rteObj.pasteCleanupSettings.keepFormat = true; }\n            else if (value === 'Clean Format') { rteObj.pasteCleanupSettings.prompt = false; rteObj.pasteCleanupSettings.plainText = false; rteObj.pasteCleanupSettings.keepFormat = false; }\n        }\n    </script>\n"
    },
    {
      "target": "src/components/rich-text-editor-paste-from-ms-word/rich-text-editor.cshtml.cs",
      "content": "using System.Collections.Generic;\nusing Microsoft.AspNetCore.Mvc.RazorPages;\n\nnamespace EJ2CoreSampleBrowser.RichTextEditor.PasteFromMsWord\n{\n    public class PasteFromMsWordModel : PageModel\n    {\n        public List<FormatOption> Options { get; set; }\n\n        public void OnGet()\n        {\n            Options = new List<FormatOption>\n            {\n                new FormatOption { Id = \"Prompt\",        Format = \"Prompt\" },\n                new FormatOption { Id = \"Plain Text\",   Format = \"Plain Text\" },\n                new FormatOption { Id = \"Keep Format\",  Format = \"Keep Format\" },\n                new FormatOption { Id = \"Clean Format\", Format = \"Clean Format\" },\n            };\n        }\n    }\n\n    public class FormatOption\n    {\n        public string Id { get; set; }\n        public string Format { get; set; }\n    }\n}\n"
    }
  ]
}