# Inline Editing in TypeScript Rich Text Editor


Inline editing enables users to edit content directly within the editor where it is displayed. Unlike traditional editors with separate toolbars, inline editing provides a seamless, on-the-spot editing experience. The toolbar appears contextually when you click or select text.

## Setup

To enable inline editing, inject the necessary modules and set the `inlineMode` property:

```typescript
import { RichTextEditor, HtmlEditor, Toolbar, QuickToolbar } from '@syncfusion/ej2-richtexteditor';

RichTextEditor.Inject(HtmlEditor, Toolbar, QuickToolbar);

let editor: RichTextEditor = new RichTextEditor({
  inlineMode: { enable: true, onSelection: true }
});
editor.appendTo('#defaultRTE');
```

## Toolbar trigger behavior

The inline toolbar appears based on the [`onSelection`](https://ej2.syncfusion.com/documentation/api/rich-text-editor/inlinemode#onselection) property within `inlineMode` settings.

| Setting | Behavior |
|---------|----------|
| `onSelection: true` | Toolbar appears only when text is selected |
| `onSelection: false` | Toolbar appears when the editor is focused |


