{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "docx-editor-comments",
  "framework": "aspnet-core",
  "type": "registry:component",
  "component": "DocxEditor",
  "variant": "comments",
  "dependencies": [
    "Syncfusion.AspNetCore.DocumentEditor"
  ],
  "description": "Document editor demonstrating threaded comments and at-mention support in the document.",
  "meta": {
    "essentialStudioRelease": "2026 Volume 2 (v34.1.29)",
    "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/docx-editor-comments.md"
  },
  "files": [
    {
      "target": "src/components/docx-editor-comments/docx-editor.cshtml",
      "content": "<div class=\"control-section\">\r\n    <ejs-documenteditorcontainer id=\"container\" enableToolbar=\"true\" height=\"590px\" userColor=\"#b70f34\"></ejs-documenteditorcontainer>\r\n</div>\r\n\r\n<script>\r\n    var documenteditor;\r\n    ej.documenteditor.DocumentEditorContainer.Inject(ej.documenteditor.Toolbar, ej.documenteditor.Ribbon);\r\n    document.addEventListener('DOMContentLoaded', function () {\r\n        var container = document.getElementById('container').ej2_instances[0];\r\n        container.toolbarMode = 'Ribbon';\r\n        container.showPropertiesPane = false;\r\n        container.documentEditorSettings.showRuler = true;\r\n        var mentionData = [\r\n            { \"Name\": \"Selma Rose\", \"Eimg\": \"3\", \"EmailId\": \"selma@mycompany.com\" },\r\n            { \"Name\": \"Russo Kay\", \"Eimg\": \"8\", \"EmailId\": \"russo@mycompany.com\" },\r\n            { \"Name\": \"Camden Kate\", \"Eimg\": \"9\", \"EmailId\": \"camden@mycompany.com\" },\r\n            { \"Name\": \"Mary Kate\", \"Eimg\": \"4\", \"EmailId\": \"marry@mycompany.com\" },\r\n            { \"Name\": \"Ursula Ann\", \"Eimg\": \"2\", \"EmailId\": \"ursula@mycompany.com\" },\r\n        ];\r\n        container.documentEditorSettings.mentionSettings = { dataSource: mentionData, fields: { text: 'Name' }}\r\n        documenteditor = container.documentEditor;\r\n        documenteditor.currentUser = \"Nancy Davolio\";\r\n        documenteditor.serviceUrl = '@Url.Content(\"~/api/documenteditor/\")';\r\n        var request = new ej.base.Fetch('@Url.Content(\"~/scripts/documenteditor/data-comments.json\")', 'GET');\r\n        request.onSuccess = function (data) {\r\n            documenteditor.open(data);\r\n            documenteditor.documentName = 'Comments';\r\n            documenteditor.showComments = true;\r\n        };\r\n        container.commentDelete = function (args) {\r\n            if (args.author !== documenteditor.currentUser) {\r\n                args.cancel = true;\r\n                ej.popups.DialogUtility.alert({\r\n                    title: 'Information',\r\n                    content: 'Delete restriction enabled. Only the author of the comment can delete it.',\r\n                    showCloseIcon: true,\r\n                    closeOnEscape: true,\r\n                });\r\n            }\r\n        };\r\n        request.send();\r\n    });\r\n</script>"
    },
    {
      "target": "src/components/docx-editor-comments/docx-editor.cshtml.cs",
      "content": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Microsoft.AspNetCore.Mvc;\r\n\r\nnamespace EJ2CoreSampleBrowser.Controllers {\r\n    public partial class DocumentEditorController : Controller\r\n    {\r\n        public ActionResult Comments()\r\n        {\r\n            List < object > exportItems = new List<object>();\r\n            exportItems.Add(new { text = \"Syncfusion Document Text (*.sfdt)\", id = \"sfdt\" });\r\n            exportItems.Add(new { text = \"Word Document (*.docx)\", id = \"word\" });\r\n            exportItems.Add(new { text = \"Word Template (*.dotx)\", id = \"dotx\" });\r\n            exportItems.Add(new { text = \"Plain Text (*.txt)\", id = \"txt\" });\r\n            ViewData[\"ExportItems\"] = exportItems;\r\n            return View();\r\n        }        \r\n    }\r\n}"
    }
  ]
}