{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "docx-editor-document-list",
  "framework": "angular",
  "type": "registry:component",
  "component": "DocxEditor",
  "variant": "document-list",
  "dependencies": [
    "@syncfusion/ej2-angular-documenteditor",
    "@syncfusion/ej2-angular-popups"
  ],
  "description": "Document list dialog opens named Word documents by author into the editor with a title bar.",
  "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": true,
    "platformIndex": "https://ai.syncfusion.com/angular/llms.txt",
    "skillPack": "syncfusion/angular-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/angular/docx-editor-document-list.md"
  },
  "files": [
    {
      "target": "src/components/docx-editor-document-list/docx-editor.component.html",
      "content": "<div class=\"control-section\">\n  <div id=\"Grid\" class=\"table-responsive\" style=\"height: calc(100vh - 180px);\">\n    <table class=\"table table-hover table-borderless align-middle\">\n      <thead>\n        <tr>\n          <th scope=\"col\">File Name</th>\n          <th scope=\"col\">Author</th>\n          <th scope=\"col\" class=\"e-de-table-actions-header\">Actions</th>\n        </tr>\n      </thead>\n      <tbody>\n        <tr *ngFor=\"let row of data\">\n          <td>\n            <svg style=\"vertical-align: sub; margin-right: 8px;\" width=\"30\" height=\"30\" viewBox=\"0 0 30 30\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n              <path d=\"M3 3C3 1.34315 4.34315 0 6 0H16.7574C17.553 0 18.3161 0.316071 18.8787 0.87868L26.1213 8.12132C26.6839 8.68393 27 9.44699 27 10.2426V27C27 28.6569 25.6569 30 24 30H6C4.34315 30 3 28.6569 3 27V3Z\" fill=\"#4889EF\"/>\n              <path d=\"M17.5 11H25V10.5042C25 9.76949 24.7304 9.0603 24.2422 8.51114L19.9463 3.67818C18.9974 2.61074 17.6374 2 16.2092 2H16V9.5C16 10.3284 16.6716 11 17.5 11Z\" fill=\"#D6E5FE\"/>\n              <path d=\"M10.3044 12H10.8868H11.104H11.6817L12.6231 16.3922L13.3963 12H15L13.5719 19H12.777H12.5552H11.8943L10.993 15.0093L10.1103 19H9.44945H9.22761H8.42808L7 12H8.60832L9.38188 16.3816L10.3044 12Z\" fill=\"white\"/>\n              <rect x=\"7\" y=\"21\" width=\"16\" height=\"2\" rx=\"1\" fill=\"white\"/>\n              <rect x=\"7\" y=\"25\" width=\"11\" height=\"2\" rx=\"1\" fill=\"white\"/>\n            </svg>\n            <span style=\"vertical-align: middle;\">{{ row.FileName }}</span>\n          </td>\n          <td class=\"e-de-table-author-cell\">{{ row.Author }}</td>\n          <td class=\"e-de-table-actions-cell\">\n            <button type=\"button\"\n                    class=\"btn btn-sm btn-link text-secondary p-2 e-de-view-btn\"\n                    title=\"View\"\n                    (click)=\"onActionClick('View', row)\">\n              <i class=\"e-icons e-eye e-flat e-de-view-icon\"></i>\n            </button>\n            <button type=\"button\"\n                    class=\"btn btn-sm btn-link text-secondary p-2 e-de-edit-btn\"\n                    title=\"Edit\"\n                    (click)=\"onActionClick('Edit', row)\">\n              <i class=\"e-icons e-edit e-flat e-de-edit-icon\"></i>\n            </button>\n          </td>\n        </tr>\n      </tbody>\n    </table>\n  </div>\n\n  <ejs-dialog id=\"component-dialog\" #Dialog\n        height=\"90%\" width='90%' [enableResize]=\"true\" [visible]=\"false\" [position]=\"position\" [isModal]=\"true\" [zIndex]= \"1500\" (created)=\"onDialogCreate()\">\n        <ng-template #content>\n            <div id=\"default_title_bar\" class=\"e-de-ctn-title\"></div>\n            <div style=\"display:block; height: calc(100vh - 230px);\">\n                <ejs-documenteditorcontainer id=\"container\" height=\"780px\" #documenteditor_default [enableToolbar]=\"true\" [locale]=\"culture\" [zIndex]= \"3000\" [showPropertiesPane]=\"false\" [serviceUrl]=\"hostUrl\" (created)=\"onCreate()\" (documentChange)=\"onDocumentChange()\"  style=\"display:block;\"></ejs-documenteditorcontainer>\n            </div>\n        </ng-template>\n    </ejs-dialog>\n</div>\n\n<style>\n@import '../style.css';\n    .ej2-new {\n        height: 590px;\n    }\n    #documenteditor_titlebar {\n        border-bottom: 1px solid #2B3481;\n        height: 36px;\n        line-height: 26px;\n        width: 100%;\n        font-size: 12px;\n        padding-left: 15px;\n        padding-right: 10px;\n        font-family: inherit;\n    }\n\n    #documenteditor_title_contentEditor {\n        height: 26px;\n        max-width: 85%;\n        width: auto;\n        overflow: hidden;\n        display: inline-block;\n        padding-left: 4px;\n        padding-right: 4px;\n        margin: 5px;\n    }\n\n    .single-line {\n        cursor: text !important;\n        outline: none;\n    }\n\n    .single-line:hover {\n        border-color: #e4e4e4 !important;\n    }\n\n    [contenteditable=\"true\"].single-line {\n        white-space: nowrap;\n        border-color: #e4e4e4 !important;\n    }\n    #Grid table {\n      border: 1px solid #d7d7d7;\n      table-layout: fixed;\n      width: 100%;\n    }\n    \n    #Grid table th,\n    #Grid table td {\n      border: 1px solid #d7d7d7;\n      padding: 12px 8px;\n      overflow: hidden;\n      white-space: nowrap;\n    }\n    \n    #Grid table th {\n      width: 33.33%;\n      font-weight: 600;\n      text-align: left;\n    }\n    #Grid table th.e-de-table-actions-header {\n      text-align: center;\n    }\n    #Grid table td {\n      width: 33.33%;\n    }\n    #Grid table td.e-de-table-actions-cell {\n      text-align: center;\n    }\n    #Grid table td.e-de-table-author-cell {\n      padding-top: 20px;\n    }\n    \n    #Grid table th:nth-child(1),\n    #Grid table td:nth-child(1) {\n      border-right: none;\n    }\n    #Grid table td:nth-child(1) {\n      overflow: hidden;\n      white-space: nowrap;\n    }\n    #Grid table th:nth-child(2),\n    #Grid table td:nth-child(2) {\n      border-left: none;\n      border-right: none;\n    }\n    #Grid table th:nth-child(3),\n    #Grid table td:nth-child(3) {\n      border-left: none;\n    }\n    \n    #Grid table tbody tr:hover {\n      background-color: var(--de-row-hover, rgba(0, 0, 0, 0.04));\n    }\n    \n    body.e-dark-mode #Grid table tbody tr:hover,\n    body[class*='-dark'] #Grid table tbody tr:hover {\n      background-color: var(--de-row-hover-dark, rgba(255, 255, 255, 0.07));\n    }\n\n    .e-de-view-btn,\n    .e-de-edit-btn {\n      background-color: transparent;\n      border: 1px solid transparent;\n      border-radius: 4px;\n      padding: 4px 6px !important;\n      margin: 0 4px;\n      cursor: pointer;\n      transition: all 0.3s ease;\n      display: inline-flex;\n      align-items: center;\n      justify-content: center;\n      min-width: 28px;\n      min-height: 28px;\n      text-decoration: none;\n      outline: none;\n      box-sizing: border-box;\n    }\n    \n    .e-de-view-btn:hover,\n    .e-de-edit-btn:hover {\n      background-color: #f5f5f5;\n      border-color: #ccc;\n      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);\n      text-decoration: none;\n      outline: none;\n    }\n    .e-de-view-btn:focus,\n    .e-de-edit-btn:focus {\n      outline: none;\n      text-decoration: none;\n    }\n    .e-de-view-btn:active,\n    .e-de-edit-btn:active {\n      background-color: #efefef;\n      border-color: #999;\n      outline: none;\n    }\n    \n    .e-de-view-icon,\n    .e-de-edit-icon {\n      font-size: 16px;\n      color: #7a8a99;\n      display: inline-block;\n      text-decoration: none;\n      font-weight: 600;\n      line-height: 1;\n    }\n    .e-de-view-btn:hover .e-de-view-icon,\n    .e-de-edit-btn:hover .e-de-edit-icon {\n      color: #5a6a7a;\n    }\n    .e-de-view-btn:active .e-de-view-icon,\n    .e-de-edit-btn:active .e-de-edit-icon {\n      color: #333;\n    }\n    \n    .editor-in-dialog {\n      min-height: 90% !important;\n    }\n\n    [class^=\"e-de-icon-\"],\n    [class*=\" e-de-icon-\"] {\n        font-family: 'Sample brower icons' !important;\n    }\n\n    .e-de-icon-Print:before {\n        content: \"\\e723\";\n    }\n\n    .e-de-icon-Download:before {\n        content: \"\\e728\";\n    }\n\n    /** sample level font icons ends*/\n</style>"
    },
    {
      "target": "src/components/docx-editor-document-list/docx-editor.component.ts",
      "content": "import { Component, ViewEncapsulation, ViewChild, OnInit } from '@angular/core';\nimport { ToolbarService, DocumentEditorContainerComponent,DocumentEditorContainerModule } from '@syncfusion/ej2-angular-documenteditor';\nimport { CommonModule } from '@angular/common';\nimport { DialogComponent,DialogModule  } from '@syncfusion/ej2-angular-popups';\nimport { TitleBar } from '../title-bar';\nimport { defaultDocument, characterFormat, paragraphFormat, styles, weblayout, WEB_API_ACTION } from '../datasource/docx-editor-data';\nimport { isNullOrUndefined } from '@syncfusion/ej2-base';\n\n/**\n * Document Editor Component\n */\n@Component({\n    selector: 'control-content',\n    templateUrl: 'docx-editor.component.html',\n    encapsulation: ViewEncapsulation.None,\n    providers: [ToolbarService],\n    standalone: true,\n    imports: [CommonModule, DocumentEditorContainerModule ,DialogModule ]\n})\nexport class DocumentListComponent implements OnInit {\n    public hostUrl: string = 'https://document.syncfusion.com/web-services/docx-editor/api/documenteditor/';\n    @ViewChild('documenteditor_default')\n    public container!: DocumentEditorContainerComponent;\n    @ViewChild('Dialog')\n    public dialog!: DialogComponent;\n \n    public data: any = [];\n    public culture: string = 'en-US';\n    public position: any = { X: 'center', Y: 'center' };\n    titleBar!: TitleBar;\n    private mode: 'View' | 'Edit' = 'View';\n\n    ngOnInit(): void {\n        // ngOnInit function\n        this.data = [{\n            'FileName': 'Getting Started.docx',\n            'Author': 'Ryan Hodson'\n        },\n        {\n            'FileName': 'Character Formatting.docx',\n            'Author': 'Elton Stoneman',\n        },\n        {\n            'FileName': 'Paragraph Formatting.docx',\n            'Author': 'Peter Shaw',\n        },\n        {\n            'FileName': 'Styles.docx',\n            'Author': 'Cody Lindley',\n        },\n        {\n            'FileName': 'Web layout.docx',\n            'Author': 'Scott Allen',\n        }];\n    }\n\n    onDialogCreate(): void {\n        let dialogElement: HTMLElement = document.getElementById('component-dialog')!;\n    }\n\n    onCreate(): void {\n        let titleBarElement: HTMLElement = document.getElementById('default_title_bar')!;\n        this.titleBar = new TitleBar(titleBarElement, this.container.documentEditor, true, false, this.dialog);\n    }\n\n    onDocumentChange(): void {\n        if (!isNullOrUndefined(this.titleBar)) {\n            this.titleBar.updateDocumentTitle();\n        }\n        this.container.documentEditor.focusIn();\n    }\n\n    public onActionClick(mode: 'View' | 'Edit', rowData: { FileName: string }): void {\n        this.mode = mode;\n        let currentDocument = rowData.FileName;\n        this.container.documentEditor.documentName = currentDocument.replace(\".docx\", \"\");\n        this.titleBar.updateDocumentTitle();\n        switch (currentDocument) {\n            case \"Getting Started.docx\":\n            this.container.documentEditor.open(JSON.stringify((<any>defaultDocument))); break;\n            case \"Character Formatting.docx\":\n            this.container.documentEditor.open(JSON.stringify((<any>characterFormat))); break;\n            case \"Paragraph Formatting.docx\":\n            this.container.documentEditor.open(JSON.stringify((<any>paragraphFormat))); break;\n            case \"Styles.docx\":\n            this.container.documentEditor.open(JSON.stringify((<any>styles))); break;\n            case \"Web layout.docx\":\n            this.container.documentEditor.open(JSON.stringify((<any>weblayout))); break;\n        }\n        if(mode === 'View'){\n            this.container.documentEditor.isReadOnly = true;\n            this.container.documentEditor.enableContextMenu = false;\n            this.container.showPropertiesPane = false;\n            document.getElementById('documenteditor-share')!.style.display ='none';\n            this.container.toolbarItems = ['Open', 'Separator', 'Find'];\n        } else {\n            this.container.documentEditor.isReadOnly = false;\n            this.container.documentEditor.enableContextMenu = true;\n            this.container.showPropertiesPane = true;\n            this.container.documentEditorSettings.showRuler = true;\n            document.getElementById('documenteditor-share')!.style.display ='block';\n            this.container.toolbarItems = ['New', 'Open', 'Separator', 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields'];\n        }\n        this.dialog.show();\n    }\n}"
    }
  ]
}