{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "docx-editor-document-protection",
  "framework": "react",
  "type": "registry:component",
  "component": "DocxEditor",
  "variant": "document-protection",
  "dependencies": [
    "@syncfusion/ej2-react-documenteditor",
    "@syncfusion/ej2-react-buttons"
  ],
  "description": "Word document editor with restrict-editing protection, current user, and editing envelope.",
  "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": true,
    "platformIndex": "https://ai.syncfusion.com/react/llms.txt",
    "skillPack": "syncfusion/react-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/react/ts/docx-editor-document-protection.md"
  },
  "files": [
    {
      "target": "src/components/docx-editor-document-protection/DocxEditor.tsx",
      "content": "import { useEffect, useRef } from 'react';\nimport { DocumentEditorContainerComponent, Toolbar, Ribbon } from '@syncfusion/ej2-react-documenteditor';\nimport { dataProtection } from './datasource';\nimport { SwitchComponent } from '@syncfusion/ej2-react-buttons';\nDocumentEditorContainerComponent.Inject(Toolbar,Ribbon);\nconst SAMPLE_CSS = `\n.flex-container {\n    display: flex;\n    justify-content: flex-end;\n    align-items: center;\n}\n\n.render-mode-info {\n    background: none;\n    border: none;\n    padding-left: 0px;\n}\n\n.render-mode-info .render-mode-info-icon {\n    height: 16px;\n    width: 16px;\n}\n\n.switchLabel {\n    font-family: \"Segoe UI\", \"GeezaPro\", \"DejaVu Serif\", sans-serif;\n    font-weight: 400;\n    line-height: 20px;\n    letter-spacing: 0.24px;\n    text-align: right;\n    font-size: 14px;\n    margin-bottom: 3px;\n}\n\n.render-mode-info .render-mode-info-icon::before {\n    line-height: normal;\n}\n\n.buttonSwitch {\n    Width: 40px;\n    Height: 24px;\n}\n\nbody {\n    margin: 0;\n    height: 100%;\n    width: 100%;\n    overflow: hidden;\n}`;\n\nconst DocumentProtection = () => {\n    useEffect(() => {\n        rendereComplete();\n    }, []);\n    let hostUrl: string =\n        \"https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/\";\n    let container = useRef<DocumentEditorContainerComponent>(null);\n    let settings={showRuler: true};\n    const onLoadDefault = (): void => {\n        container.current.documentEditor.open(JSON.stringify(dataProtection));\n        container.current.documentEditor.documentName = \"Document Protection\";\n        container.current.documentChange = (): void => {\n            container.current.documentEditor.focusIn();\n        };\n    };\n    const rendereComplete = (): void => {\n        container.current.showPropertiesPane = false;\n        container.current.documentEditor.currentUser = \"engineer@mycompany.com\";\n        // container.documentEditor.pageOutline = '#E0E0E0';\n        // container.documentEditor.acceptTab = true;\n        container.current.documentEditor.resize();\n        onLoadDefault();\n    };\n    const change = (args):void=>{\n        if (args.checked) {\n            container.current.toolbarMode = 'Ribbon';\n        }\n        else {\n            container.current.toolbarMode = 'Toolbar';\n        }\n    }\n    return (\n        <div className=\"control-pane\">\n            <style>{SAMPLE_CSS}</style>\n            <div className=\"col-lg-9 control-section\">\n                <div className=\"flex-container\">\n                                  <label className=\"switchLabel\" htmlFor=\"toolbarSwitch\">Ribbon UI</label>\n                            <div className=\"e-message render-mode-info\">\n                                <span className=\"e-msg-icon render-mode-info-icon\" title=\"Turn OFF to switch from Ribbon to toolbar UI\"></span>\n                            </div>\n                                <SwitchComponent cssClass=\"buttonSwitch\" id=\"toolbarSwitch\" change={change} checked={true}></SwitchComponent>\n                                </div>\n                <div id=\"documenteditor_container_body\">\n                    <DocumentEditorContainerComponent\n                        id=\"container\"\n                        ref={container}\n                        style={{ display: \"block\" }}\n                                                height={\"590px\"}\n                        toolbarMode= {\"Ribbon\"}\n                        serviceUrl={hostUrl}\n                        enableToolbar={true}\n                        locale=\"en-US\"\n                        documentEditorSettings={settings}\n                    />\n                </div>\n            </div>\n        </div>\n    );\n}\nexport default DocumentProtection;"
    },
    {
      "target": "src/components/docx-editor-document-protection/datasource.ts",
      "content": "export let dataProtection = { \"sfdt\": \"UEsD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