File Browser in JavaScript Rich Text Editor

Rich Text Editor allows to browse and insert an image in the edit panel using the file browser. File browser allows the users to browse and select a file or folder from the file system and it supports various cloud services.

Required dependencies

Install the FileManager package and related dependencies:

npm install @syncfusion/ej2-filemanager @syncfusion/ej2-layouts @syncfusion/ej2-grids

Dependency structure

@syncfusion/ej2-richtexteditor
    |-- @syncfusion/ej2-data
    |-- @syncfusion/ej2-layouts
    |-- @syncfusion/ej2-grids
    |-- @syncfusion/ej2-filemanager

CSS theme reference

Map the above packages style and script reference in sample as like below

Setup steps

The following example explains about how to configure the file browser within the Rich Text Editor component.

  1. Add FileManager to toolbar — Configure the FileManager toolbar item in the toolbarSettings.items property
  2. Enable file browser — Set the enable property to true in the fileManagerSettings property.
  3. Configure endpoints — Map server endpoints for file upload, deletion, and browsing.

See also