# rich-text-editor-file-browser

> Rich text editor sample with file browser insertion and media management.

**Framework:** javascript  **Component:** RichTextEditor  **Variant:** file-browser

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/javascript/rich-text-editor-file-browser.json
```

**Install Package(s)**

```bash
npm install @syncfusion/ej2-richtexteditor
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/rich-text-editor-file-browser/rich-text-editor.html

```html
<div class="control-section">
    <div class="sample-container">
        <div class="default-section">
            <div id="container">
                <p>Rich Text Editor allows inserting images from online sources as well as the local computers where you want to insert the image in your content.</p>
                <p><b>Get started Quick Toolbar to click on the image</b></p>
                <p>It is possible to add custom style on the selected image inside the RichTextEditor through the quick toolbar.</p>
                <img id='rteImageID' style="width:300px; height:300px;transform: rotate(0deg);" alt="Logo" src="https://ej2.syncfusion.com/demos/src/rich-text-editor/images/RTEImage-Feather.png" />
            </div>
        </div>
    </div>
</div>

```

### src/components/rich-text-editor-file-browser/rich-text-editor.ts

```typescript
import { RichTextEditor, Toolbar, Image, HtmlEditor, QuickToolbar, FileManager, PasteCleanup, Table, Video, Audio, ClipBoardCleanup, AutoFormat } from '@syncfusion/ej2-richtexteditor';
RichTextEditor.Inject(Toolbar, Image, HtmlEditor, QuickToolbar, FileManager, PasteCleanup, Table, Video, Audio, ClipBoardCleanup, AutoFormat);

export function initRichTextEditorFileBrowser(): void {
    let hostUrl: string = 'https://services.syncfusion.com/js/production/';

    let defaultRTE: RichTextEditor = new RichTextEditor({
        toolbarSettings: {
            items: ['FileManager', 'Image']
        },
        fileManagerSettings: {
            enable: true,
            ajaxSettings: {
                url: hostUrl + 'api/RichTextEditor/FileOperations',
                getImageUrl: hostUrl + 'api/RichTextEditor/GetImage',
                uploadUrl: hostUrl + 'api/RichTextEditor/Upload',
                downloadUrl: hostUrl + 'api/RichTextEditor/Download'
            }
        }
    });
    defaultRTE.appendTo('#container');
}

```
