{
  "$schema": "https://ai.syncfusion.com/schema/registry-item.json",
  "name": "rich-text-editor-default",
  "framework": "angular",
  "type": "registry:component",
  "component": "RichTextEditor",
  "variant": "default",
  "dependencies": [
    "@syncfusion/ej2-angular-richtexteditor"
  ],
  "description": "Rich text editor sample with formatting tools for composing and editing content.",
  "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/angular/llms.txt",
    "skillPack": "syncfusion/angular-ui-components-skills",
    "docs": "https://ai.syncfusion.com/gallery/angular/rich-text-editor-default.md"
  },
  "files": [
    {
      "target": "src/components/rich-text-editor-default/tools.component.ts",
      "content": "/**\n * Rich Text Editor Overview Sample\n */\nimport { Component, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { NgStyle } from '@angular/common';\nimport { ToolbarService, LinkService, ImageService, HtmlEditorService, EmojiPickerService, VideoService, AudioService, FormatPainterService, RichTextEditorModule, QuickToolbarService, PasteCleanupService, CountService, ToolbarSettingsModel, ImageSettingsModel, ActionBeginEventArgs, CodeBlockService, ClipBoardCleanupService, AutoFormatService } from '@syncfusion/ej2-angular-richtexteditor';\nimport { RichTextEditorComponent, TableService, FileManagerService, SlashMenuService, ImportExportService } from '@syncfusion/ej2-angular-richtexteditor';\nimport { FileManagerSettingsModel, QuickToolbarSettingsModel, SlashMenuSettingsModel, ExportPdfModel, ExportWordModel, ImportWordModel } from '@syncfusion/ej2-angular-richtexteditor';\nimport { createElement, addClass, removeClass, Browser, getComponent  } from '@syncfusion/ej2-base';\nimport * as CodeMirror from 'codemirror';\nimport 'codemirror/mode/javascript/javascript';\nimport 'codemirror/mode/css/css.js';\nimport 'codemirror/mode/htmlmixed/htmlmixed.js';\nimport { Sidebar } from '@syncfusion/ej2-navigations';\nimport { MentionComponent, MentionModule } from '@syncfusion/ej2-angular-dropdowns';\n\n@Component({\n    selector: 'control-content',\n    templateUrl: 'tools.html',\n    encapsulation: ViewEncapsulation.None,\n    providers: [ToolbarService, LinkService, ImageService, HtmlEditorService, TableService, FileManagerService, EmojiPickerService, VideoService, AudioService, FormatPainterService, QuickToolbarService, PasteCleanupService, CountService, SlashMenuService, ImportExportService, CodeBlockService, ClipBoardCleanupService, AutoFormatService],\n    standalone: true,\n    imports: [ RichTextEditorModule, MentionModule, NgStyle]\n})\nexport class FullFeatureComponent {\n\n    @ViewChild('toolsRTE')\n    public rteObj!: RichTextEditorComponent;\n\n    @ViewChild('editorMention')\n    public mention!: MentionComponent;\n\n    public emailData: { [key: string]: Object }[] = [\n        { name: \"Selma Rose\", initial: 'SR', email: \"selma@gmail.com\", color: '#FAFDFF', bgColor: '#01579B' },\n        { name: \"Maria\", initial: 'MA', email: \"maria@gmail.com\", color: '#004378', bgColor: '#ADDBFF' },\n        { name: \"Russo Kay\", initial: 'RK', email: \"russo@gmail.com\", color: '#F9DEDC', bgColor: '#8C1D18' },\n        { name: \"Robert\", initial: 'RO', email: \"robert@gmail.com\", color: '#FFD6F7', bgColor: '#37003A' },\n        { name: \"Camden Kate\", initial: 'CK', email: \"camden@gmail.com\", color: '#FFFFFF', bgColor: '#464ECF' },\n        { name: \"Garth\", initial: 'GA', email: \"garth@gmail.com\", color: '#FFFFFF', bgColor: '#008861' },\n        { name: \"Andrew James\", initial: 'AJ', email: \"james@gmail.com\", color: '#FFFFFF', bgColor: '#53CA17' },\n        { name: \"Olivia\", initial: 'OL', email: \"olivia@gmail.com\", color: '#FFFFFF', bgColor: '#8C1D18' },\n        { name: \"Sophia\", initial: 'SO', email: \"sophia@gmail.com\", color: '#000000', bgColor: '#D0BCFF' },\n        { name: \"Margaret\", initial: 'MA', email: \"margaret@gmail.com\", color: '#000000', bgColor: '#F2B8B5' },\n        { name: \"Ursula Ann\", initial: 'UA', email: \"ursula@gmail.com\", color: '#000000', bgColor: '#47ACFB' },\n        { name: \"Laura Grace\", initial: 'LG', email: \"laura@gmail.com\", color: '#000000', bgColor: '#FFE088' },\n        { name: \"Albert\", initial: 'AL', email: \"albert@gmail.com\", color: '#FFFFFF', bgColor: '#00335B' },\n        { name: \"William\", initial: 'WA', email: \"william@gmail.com\", color: '#FFFFFF', bgColor: '#163E02' }\n    ];\n\n    public fields: Object = { text: 'name' };\n\n    private hostUrl: string = 'https://services.syncfusion.com/angular/production/';\n\n    public tools: ToolbarSettingsModel = {\n        items: [\n            'Undo', 'Redo', '|', 'ImportWord', 'ExportWord', 'ExportPdf', '|',\n            'Bold', 'Italic', 'Underline', 'StrikeThrough', 'InlineCode', '|', 'CreateLink', 'Image', 'CreateTable', 'CodeBlock',\n            'HorizontalLine', 'Blockquote', '|', 'LineHeight', 'Formats', 'Alignments', '|', 'BulletFormatList', 'NumberFormatList', 'Checklist', '|', 'Outdent', 'Indent', '|',\n            'FontColor', 'BackgroundColor', 'FontName', 'FontSize', '|', 'LowerCase', 'UpperCase', '|', 'SuperScript', 'SubScript', '|',\n            'EmojiPicker', 'FileManager', 'Video', 'Audio', '|', 'FormatPainter', 'ClearFormat',\n            '|', 'Print', 'FullScreen', '|', 'SourceCode']\n    };\n\n    public insertImageSettings: ImageSettingsModel = {\n        saveUrl: this.hostUrl + 'api/RichTextEditor/SaveFile',\n        removeUrl: this.hostUrl + 'api/RichTextEditor/DeleteFile',\n        path: this.hostUrl + 'RichTextEditor/'\n    }\n\n    public fileManagerSettings: FileManagerSettingsModel = {\n        enable: true,\n        ajaxSettings: {\n            url: this.hostUrl + 'api/RichTextEditor/FileOperations',\n            getImageUrl: this.hostUrl + 'api/RichTextEditor/GetImage',\n            uploadUrl: this.hostUrl + 'api/RichTextEditor/Upload',\n            downloadUrl: this.hostUrl + 'api/RichTextEditor/Download'\n        }\n    };\n\n    public quickToolbarSettings: QuickToolbarSettingsModel = {\n        table: ['Tableheader', 'TableRemove', '|', 'TableRows', 'TableColumns', 'TableCell', '|', 'TableEditProperties', 'TableCellProperties', 'Styles', 'BackgroundColor', 'Alignments', 'TableCellVerticalAlign'],\n        text: ['Formats', '|', 'Bold', 'Italic', 'Fontcolor', 'BackgroundColor', '|', 'CreateLink', 'Image', 'CreateTable', 'Blockquote', '|' , 'Unorderedlist', 'Orderedlist', 'Indent', 'Outdent'],\n        showOnRightClick: true,\n    };\n\n    public placeholder: string = 'Type something or use @ to tag a user...';\n    public slashMenuSettings: SlashMenuSettingsModel = {\n        enable: true,\n        items: ['Paragraph', 'Heading 1', 'Heading 2', 'Heading 3', 'Heading 4', 'OrderedList', 'UnorderedList',\n            'CodeBlock', 'Blockquote', 'Link', 'Image', 'Video', 'Audio', 'Table', 'Emojipicker',\n        ]\n    };\n    public importWord: ImportWordModel = {\n        serviceUrl: this.hostUrl + 'api/RichTextEditor/ImportFromWord',\n    };\n    public exportWord: ExportWordModel = {\n        serviceUrl: this.hostUrl + 'api/RichTextEditor/ExportToDocx',\n        fileName: 'RichTextEditor.docx',\n        stylesheet: `\n        .e-rte-content {\n            font-size: 1em;\n            font-weight: 400;\n            margin: 0;\n        }\n    `\n    };\n    public exportPdf: ExportPdfModel = {\n        serviceUrl: this.hostUrl + 'api/RichTextEditor/ExportToPdf',\n        fileName: 'RichTextEditor.pdf',\n        stylesheet: `\n        .e-rte-content{\n            font-size: 1em;\n            font-weight: 400;\n            margin: 0;\n        }\n    `\n    };\n    public codeMirror: any;\n\n    public mirrorConversion(e?: any): void {\n        const id: string = this.rteObj.getID() + 'mirror-view';\n        let mirrorView: HTMLElement = this.rteObj.element.querySelector('#' + id) as HTMLElement;\n        if (e.targetItem === 'Preview') {\n            this.rteObj.value = this.codeMirror.getValue();\n            this.rteObj.dataBind();\n            this.rteObj.rootContainer.classList.remove('e-rte-code-mirror-enabled');\n            this.rteObj.focusIn();\n        } else {\n            this.rteObj.rootContainer.classList.add('e-rte-code-mirror-enabled');\n            this.rteObj.rootContainer.classList.remove('e-source-code-enabled');\n            const editorVlaue: string = (this.rteObj.element.querySelector('.e-rte-srctextarea') as HTMLTextAreaElement).value;\n            if (!mirrorView) {\n                mirrorView = createElement('div', { className: 'rte-code-mirror', id: id, styles: 'display: none;' });\n                this.rteObj.rootContainer.appendChild(mirrorView);\n                this.renderCodeMirror(mirrorView, editorVlaue === null ? '' : editorVlaue);\n            }\n            else {\n                this.codeMirror.setValue(editorVlaue);\n            }\n            this.codeMirror.focus();\n        }\n    }\n\n\n    public renderCodeMirror(mirrorView: HTMLElement, content: string): void {\n        const editorFactory = (CodeMirror as any).default ?? CodeMirror;\n        this.codeMirror = editorFactory(mirrorView, {\n            value: content,\n            lineNumbers: true,\n            mode: 'text/html',\n            lineWrapping: true,\n        });\n    }\n    public handleFullScreen(e: any): void {\n        const sbCntEle = document.querySelector('.sb-content.e-view') as HTMLElement | null;\n        const sbHdrEle = document.querySelector('.sb-header.e-view') as HTMLElement | null;\n        const leftBar = document.querySelector('#left-sidebar') as HTMLElement | null;\n        const sideBarElem = document.body.querySelector('#left-sidebar') as HTMLElement | null;\n        const sideBar = sideBarElem ? (getComponent(sideBarElem, 'sidebar') as Sidebar | undefined) : undefined;\n        if (e.targetItem === 'Maximize') {\n            if (Browser.isDevice && Browser.isIos) {\n                if (sbCntEle) addClass([sbCntEle], ['hide-header']);\n                if (sbHdrEle) addClass([sbHdrEle], ['hide-header']);\n            }\n            if (sideBar){\n                sideBar.hide();\n            }\n        } else if (e.targetItem === 'Minimize') {\n            if (Browser.isDevice && Browser.isIos) {\n                if (sbCntEle) removeClass([sbCntEle], ['hide-header']);\n                if (sbHdrEle) removeClass([sbHdrEle], ['hide-header']);\n            }\n            if (sideBar) {\n                sideBar.show();\n            }\n            if (!Browser.isDevice && leftBar) {\n                addClass([leftBar], ['e-open']);\n            }\n        }\n    }\n    public actionCompleteHandler(e: any): void {\n        if (e.targetItem && (e.targetItem === 'SourceCode' || e.targetItem === 'Preview')) {\n            this.mirrorConversion(e);\n        }\n    }\n\n    public actionBeginHandler(e: ActionBeginEventArgs): void {\n        if (e.requestType === 'Maximize' || e.requestType === 'Minimize') {\n            this.handleFullScreen(e);\n        }\n    }\n}\n"
    },
    {
      "target": "src/components/rich-text-editor-default/tools.html",
      "content": "<div class=\"control-section\">\n    <ejs-richtexteditor #toolsRTE id='alltoolRTE' [toolbarSettings]='tools' [insertImageSettings]=\"insertImageSettings\"\n        [showCharCount]='true' [enableXhtml]='true' [fileManagerSettings]='fileManagerSettings'\n        [quickToolbarSettings]='quickToolbarSettings' (actionBegin)='actionBeginHandler($event)'\n        (actionComplete)='actionCompleteHandler($event)' [enableTabKey]='true' [placeholder]='placeholder'\n        [slashMenuSettings]=\"slashMenuSettings\" [importWord]=\"importWord\" [exportWord]=\"exportWord\"\n        [exportPdf]=\"exportPdf\">\n        <ng-template #valueTemplate>\n            <h2>Welcome to the Angular Rich Text Editor</h2> <p> The Rich Text Editor, a WYSIWYG (what you see is what you get) editor, is a user interface that allows you to create, edit, and format rich text content. You can try out a demo of this editor here. </p> <h3>Do you know the key features of the editor?</h3> <ul><li> Basic features include headings, block quotes, numbered lists, bullet lists, and support to insert images, tables, audio, and video. </li> <li> Inline styles include <b>bold</b>, <em>italic</em>, <span style=\"text-decoration: underline\">underline</span>, <span style=\"text-decoration: line-through\">strikethrough</span>, <a class=\"e-rte-anchor\" href=\"https://ej2.syncfusion.com/demos/#/material/rich-text-editor/tools.html\" title=\"https://ej2.syncfusion.com/demos/#/material/rich-text-editor/tools.html\" aria-label=\"Open in new window\">hyperlinks</a>,<code>InlineCode</code>, 😀 and more. </li> <li> The toolbar has multi-row, expandable, and scrollable modes. The Editor supports an inline toolbar, a floating toolbar, and custom toolbar items. </li> <li> Integration with Syncfusion<sup>®</sup> Mention control lets users tag other users. To learn more, check out the <a class=\"e-rte-anchor\" href=\"https://ej2.syncfusion.com/documentation/rich-text-editor/mention-integration\" title=\"Mention Documentation\" aria-label=\"Open in new window\">documentation</a> and <a class=\"e-rte-anchor\" href=\"https://ej2.syncfusion.com/demos/#/material/rich-text-editor/mention-integration.html\" title=\"Mention Demos\" aria-label=\"Open in new window\">demos</a>. </li><li><b>Paste from MS Word</b> - helps to reduce the effort while converting the Microsoft Word content to HTML format with format and styles. To learn more, check out the documentation <a class=\"e-rte-anchor\" href=\"https://ej2.syncfusion.com/documentation/rich-text-editor/paste-cleanup\" title=\"Paste from MS Word Documentation\" aria-label=\"Open in new window\">here</a>. </li> <li> Other features: placeholder text, character count, form validation, enter key configuration, resizable editor, IFrame rendering, tooltip, source code view, RTL mode, persistence, HTML Sanitizer, autosave, and <a class=\"e-rte-anchor\" href=\"https://ej2.syncfusion.com/documentation/api/rich-text-editor/\" title=\"Rich Text Editor API\" aria-label=\"Open in new window\">more</a>. </li> </ul> <h3>Auto Formatting – Write Faster, Format Smarter</h3> <p> Boost your productivity with Auto Formatting, a powerful feature that lets you style content instantly using simple, familiar Markdown-style shortcuts. No need to reach for the toolbar — just type and watch your content transform in real time. </p> <h4>Effortless Formatting Shortcuts</h4> <table class=\"e-rte-table\"> <thead> <tr> <th>Action</th> <th>Shortcut</th> </tr> </thead> <tbody> <tr> <td>Bulleted List</td> <td> Start a line with <code>*</code> or <code>-</code> followed by a space </td> </tr> <tr> <td>Numbered List</td> <td> Start a line with <code>1.</code> or <code>i.</code> followed by a space </td> </tr> <tr> <td>Checklist / To-do</td> <td> Start a line with <code>[ ]</code> or <code>[x]</code> followed by a space </td> </tr> <tr> <td>Headings (H1 to H6)</td> <td> Use <code>#</code>, <code>##</code>, <code>###</code>, <code>####</code>, <code>#####</code>, or <code>######</code> followed by a space </td> </tr> <tr> <td>Block Quote</td> <td> Start a line with <code>></code> followed by a space </td> </tr> <tr> <td>Code Block</td> <td> Start a line with <code>```</code> followed by a space </td> </tr> <tr> <td>Horizontal Line</td> <td> Start a line with <code>---</code> followed by a space </td> </tr> <tr> <td>Bold Text</td> <td>Type <code>**text**</code> or <code>__text__</code></td> </tr> <tr> <td>Italic Text</td> <td>Type <code>*text*</code> or <code>_text_</code></td> </tr> <tr> <td>Inline Code</td> <td>Type <code>`text`</code></td> </tr> <tr> <td>Strikethrough</td> <td>Type <code>~~text~~</code></td> </tr> </tbody> </table> <h3>Elevating Your Content with Images</h3> <p> Images can be added to the editor by pasting or dragging into the editing area, using the toolbar to insert one as a URL, or uploading directly from the File Browser. Easily manage your images on the server by configuring the <a class=\"e-rte-anchor\" href=\"https://ej2.syncfusion.com/documentation/api/rich-text-editor/#insertimagesettings\" title=\"Insert Image Settings API\" aria-label=\"Open in new window\">insertImageSettings</a> to upload, save, or remove them. </p> <p> The Editor can integrate with the Syncfusion<sup>®</sup> Image Editor to crop, rotate, annotate, and apply filters to images. Check out the demos <a class=\"e-rte-anchor\" href=\"https://ej2.syncfusion.com/demos/#/material/rich-text-editor/image-editor-integration.html\" title=\"Image Editor Demo\" aria-label=\"Open in new window\">here</a>. </p> <p><img alt=\"Sky with sun\" src=\"https://cdn.syncfusion.com/ej2/richtexteditor-resources/RTE-Overview.png\" style=\"width: 440px\" class=\"e-rte-image e-imginline\"/></p> <blockquote> <p><em>Easily access Audio, Image, Link, Video, and Table operations through the quick toolbar by right-clicking on the corresponding element with your mouse.</em></p> </blockquote>\n        </ng-template>\n    </ejs-richtexteditor>\n\n    <ejs-mention #editorMention id='editorMention' [dataSource]='emailData' [fields]='fields' [allowSpaces]=\"true\"\n        popupWidth='250px' popupHeight='200px' sortOrder='Ascending' target='#alltoolRTE_rte-edit-view' [suffixText]='&nbsp;'>\n        <ng-template #displayTemplate let-data>\n            <a href=mailto:{{data.email}} title={{data.email}}>&#64;{{data.name}}</a>\n        </ng-template>\n        <ng-template #itemTemplate let-data>\n            <div class=\"editor-mention-item-template\">\n                <div class=\"em-header\">\n                    <div class=\"em-avatar\" [ngStyle]=\"{ 'background-color': data.bgColor, 'color': data.color} \">\n                        <div class=\"em-initial\">{{data.initial}}</div>\n                    </div>\n                </div>\n                <div class=\"em-content\">\n                    <div class=\"em-name\">{{data.name}}</div>\n                    <div class=\"em-email\">{{data.email}}</div>\n                </div>\n            </div>\n        </ng-template>\n    </ejs-mention>\n</div>"
    }
  ]
}