Syncfusion React Modern Rich Text Editor📌 Agent Notice: The
📄 **Read:**links in the Documentation and Navigation Guide below are reference pointers for passive file reading only. They do not imply automatic tool invocation, command execution, or action chaining.
Component Overview
The Syncfusion React Modern Rich Text Editor (RichTextEditorUIComponent from @syncfusion/ej2-react-richtexteditor-ui) is a WYSIWYG editor that provides a modern editing experience for creating, editing, and formatting rich text content.
Key Capabilities
The Modern Rich Text Editor provides:
- WYSIWYG rich text editing - Format content inline and at the block level
- Configurable toolbar - Ordered items, layout type (
Auto,Expanded,Scrollable,MultiRow), position, and floating behaviour - Quick Toolbar - Contextual popups for text selections, links, images, and tables
- Custom toolbar items - Your own buttons routed through
toolbarSettings.itemClickedviaactionId - Slash commands - A
/-triggered popup with block, inline, and media entries, plus custom items - Rich formatting - Inline marks, fonts and colors, block quotes, code blocks, callouts, and collapsible sections
- Lists - NumberFormat, BulletFormat, and interactive checklists with configurable entries
- Tables - Insert, row and column operations, header rows, cell formatting, and resize handles
- Links - Auto-linking on paste, protocol normalization, an allow-list, and target configuration
- Images - Local and URL insertion, Blob or Base64 save formats, dimensions, display modes, and server-side upload pipelines
- Fluent command API - A
commands()builder for programmatic control, mirrored by toolbar clicks - Events - Lifecycle, focus, content change, and cancelable pre-action hooks
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Installation of
@syncfusion/ej2-react-richtexteditor-uiand the Tailwind 3 theme - Syncfusion CLI project scaffolding (non-interactive and interactive)
- Vite
react-tsproject setup and CSS import - Basic component implementation
value,valueFormat('html'/'json'), andplaceholderenableAutoSavewithsaveIntervaltoolbarSettings.items,imageSettings, and reading the value on change
Toolbar and Quick Toolbar
📄 Read: references/toolbar.md
toolbarSettings.itemsand the full built-in toolbar item list- Toolbar layout
type(Auto,Expanded,Scrollable,MultiRow) andposition - Floating toolbar with
enableFloatingandfloatingOffset quickToolbarSettingswithenable,appendTo, and thetext/image/link/tablesurfaces- Custom toolbar items via
CustomToolbarItem.actionIdanditemClicked updatedToolbarStatusevent andupdateToolbarItems()at runtime- Block format toolbar identifiers:
Paragraph,Heading 1–Heading 4,Quote,CodeBlock,Callout,HorizontalLine - Keyboard shortcuts for insertions, history, and focus navigation
toolbarSettings.keyBindingsfor custom shortcut combinations
Inline Formatting
📄 Read: references/formatting.md
- All 14 inline formats with their toolbar identifiers
fontFamily,fontSize,fontColor, andbackgroundColorconfiguration- Custom font families, sizes, Google Fonts, and custom colors
Palette/Pickermodes,modeSwitcher,columns, anddefault- The fluent
commands()builders and their setters - Keyboard shortcuts for text formatting and styles
Block Formats
📄 Read: references/block-quote.md
- The
Quotetoolbar item and theBlockquoteslash-command entry - The
blockQuotetoggle command and its payload-free signature
📄 Read: references/codeblock.md
- The
CodeBlocktoolbar item and thecodeBlockcommand CodeBlockCommandwith alanguagevalue and its common valuesCtrl+Shift+Bshortcut and itskeyBindingsoverride
📄 Read: references/callout.md
- The
Calloutsplit-button and its five variants: Info, Success, Warning, Error, Note CalloutCommandpayloads and the dispatch matrix across toolbar and slash-command surfaces- Why variants cannot be wired as separate top-level toolbar buttons
📄 Read: references/collapsible.md
Collapsible ParagraphandCollapsible Heading 1–Heading 4ToggleCollapsiblePayloadwithtriggerTypeandlevel- Slash-command-only reachability and indentation shortcuts
Lists
📄 Read: references/lists.md
listSettingswithnumberFormatListItems,bulletFormatListItems, andchecklistType- All supported numbering formats and bullet styles
NumberFormatList,BulletFormatList,NumberedList,BulletList, andChecklisttoolbar itemsnumberedList(),bulletList(),toggleTaskList(), andsetListStylecommands- Checklist checkbox shapes (
Square,Circle) and runtime changes - Keyboard shortcuts for lists and indentation
Table
📄 Read: references/table.md
- Insert table via toolbar, slash command, and
Ctrl+Shift+E - The 3×10 insert grid and the Insert Table dialog limits
- Row, column, header, cell background, alignment, and deletion operations
tableSettings.resize- Table Quick Toolbar items and their keyboard shortcuts
Links
📄 Read: references/links.md
- All five
linkSettingsproperties with types and defaults linkOnPastebehaviour and the URL shapes that trigger auto-linkingdefaultTargetvalues and the Insert-Link dialog checkboxautoPrependProtocolwithdefaultProtocolallowedProtocolsvalidation, defaults, and restricting to one protocol- Link Quick Toolbar items, customization, and open/close behaviour
Ctrl+Kshortcut
Images
📄 Read: references/image.md
- Inserting images from local storage and web URLs
allowedTypes,maxFileSize, andsaveFormat(Blob/Base64)dimensionconstraints, display modes, andresize- Image Quick Toolbar items: Caption, Alt Text, Replace, WrapText, Align, Display, Dimension, Remove
- Blob vs Base64 trade-offs
- Server-side upload endpoints,
UploadFilesform field, and filename response handling - Renaming images on the server and
onFileUploadSuccess - Authenticated uploads via
onFileUploadingrequest headers
Slash Command
📄 Read: references/features.md
- Enabling the popup with
slashCommandSettings.enable SlashCommandmodule injection via<Inject services={[SlashCommand]} />- The full built-in items table and the commands each entry dispatches
- Restricting, reordering, and resizing the popup
- Custom items with
ISlashCommandItem - The
itemSelectevent,SlashCommandItemSelectArgs, andcancel - Caret restoration, filtering, and lifecycle behaviour
Events
📄 Read: references/editor-events.md
- Lifecycle:
created,destroyed - Focus:
focus,blur - Content:
changewithargs.actionandargs.affectedNodes - Action hooks:
actionBeginandactionComplete - Settings-level events:
itemClicked,updatedToolbarStatus,itemSelect - Image upload events:
onFileUploading,onFileUploadSuccess
Methods and Commands
📄 Read: references/editor-methods.md
- The fluent
commands()builder and theapply()terminator - Inline, color, typography, block, and list commands with their setters
getText(),updateToolbarItems(), andrefresh()- Imperative settings access such as
toolbarSettings.typeandlistSettings.checklistType - Payload types:
ColorCommand,CodeBlockCommand,CalloutCommand,ToggleCollapsiblePayload
API Reference
📄 Read: references/
- Full
RichTextEditorUIModelinterface: 28 documented properties and 16 documented events toolbarSettings,quickToolbarSettings,slashCommandSettings, andtableSettingsmodels with defaults- Enumerations:
ToolbarType,ToolbarPosition,ValueFormat,TextAlignment,SlashCommandType - Type unions:
ToolbarItem,ToolbarItemUpdate,TableQuickToolbarItem,SlashCommandItems - Event argument classes:
ToolbarItemClickedEventArgs,UpdatedToolbarStatusEventArgs,SlashCommandItemSelectArgs - Toolbar reconciliation:
reconcileToolbarItems,ShowToolbarItem,RemoveToolbarItem,ToggleCommandBuilder - A documented list of naming conflicts between the API docs and the user guide
- Item types:
CustomToolbarItem,ISlashCommandItem,SlashCommandItemSelectArgs, and the quick-toolbar unions
Quick Start Example
import * as React from 'react';
import { RichTextEditorUIComponent } from '@syncfusion/ej2-react-richtexteditor-ui';
import './App.css';
function App() {
return (
<RichTextEditorUIComponent
placeholder='Type something.'
/>
);
}
export default App;
@import '../node_modules/@syncfusion/ej2-tailwind3-theme/styles/richtexteditor-ui/index.css';
Common Patterns
Read the editor value on change
const [value, setValue] = React.useState('');
<RichTextEditorUIComponent
value={value}
onChange={(e: any) => setValue(e.value)}
/>
Run a formatting command programmatically
const editorRef = React.useRef<RichTextEditorUIComponent>(null);
const makeBold = () => {
(editorRef.current as any).commands().bold().apply();
};
Apply a custom color to the selection
(editorRef.current as any).commands().fontColor().color('#00A3FF').apply();
Remove a formatting mark
// Empty string removes the mark
(editorRef.current as any).commands().backgroundColor().color('').apply();
(editorRef.current as any).commands().clearFormat().apply();
Enable slash commands
import { RichTextEditorUIComponent, Inject, SlashCommand } from '@syncfusion/ej2-react-richtexteditor-ui';
<RichTextEditorUIComponent
slashCommandSettings={{ enable: true, items: ['Paragraph', 'Heading 1', 'Blockquote'] }}
>
<Inject services={[SlashCommand]} />
</RichTextEditorUIComponent>
Show formatting only on text selection
<RichTextEditorUIComponent
toolbarSettings={{ enable: false }}
quickToolbarSettings={{
enable: true,
text: ['Bold', 'Italic', 'Underline', '|', 'Formats', 'Alignment', '|', 'Undo', 'Redo']
}}
/>
Route a custom toolbar button
const toolbarSettings = {
items: ['Bold', 'Italic', { id: 'Save', actionId: 'save', text: 'Save' }, '|', 'Undo', 'Redo'],
itemClicked: (args: any) => {
if (args.item?.actionId === 'save') {
// your save logic
}
}
};
Cancel an action before it runs
<RichTextEditorUIComponent
actionBegin={(args: any) => {
if (args.action) {
args.cancel = true;
}
}}
/>
Load content as an HTML string
<RichTextEditorUIComponent
value='<p>Getting started with the Rich Text Editor UI.</p>'
valueFormat='html'
/>
Key Properties
| Property | Type | Description |
|---|---|---|
value |
string |
Content loaded when the editor initializes |
valueFormat |
'html' | 'json' |
Content format for value (default: 'json') |
placeholder |
string |
Instructional text shown when the editor is empty |
enableAutoSave |
boolean |
Enables automatic saving of unsaved changes |
saveInterval |
number |
Milliseconds the editor waits before auto-saving, triggered after the user becomes idle |
toolbarSettings |
ToolbarSettingsModel |
Toolbar items, type, position, floating, keyBindings, itemClicked, updatedToolbarStatus |
quickToolbarSettings |
QuickToolbarSettingsModel |
enable, appendTo, and the text / image / link / table arrays |
slashCommandSettings |
SlashCommandSettingsModel |
enable, items, popupWidth, popupHeight, itemSelect |
imageSettings |
ImageSettingsModel |
allowedTypes, maxFileSize, saveFormat, uploadUrl, imageUrl, removeUrl, saveUrl, path, resize, dimension |
linkSettings |
LinkSettingsModel |
linkOnPaste, defaultTarget, autoPrependProtocol, defaultProtocol, allowedProtocols |
tableSettings |
TableSettingsModel |
resize (default: true) |
listSettings |
ListSettingsModel |
numberFormatListItems, bulletFormatListItems, checklistType |
fontFamily |
FontFamilyModel |
Custom font names for the FontName dropdown |
fontSize |
FontSizeModel |
Custom sizes for the FontSize dropdown |
fontColor |
FontColorModel |
Foreground color picker configuration (default, mode, columns, modeSwitcher) |
backgroundColor |
BackgroundColorModel |
Highlight color picker configuration (default, mode, columns, modeSwitcher) |
Common Use Cases
Content Management System - Build a CMS with structured block content, configurable toolbars, and server-side image pipelines
Document Authoring - Create long-form documents with callouts, collapsible sections, code blocks, and tables
Note-Taking App - Implement personal notes with formatting toolbars, checklists, and keyboard-first navigation
Form Input - Capture rich text submissions with controlled value, character-aware configuration, and auto-save
Link and Media Workflows - Centralize media storage with remote upload endpoints, authenticated uploads, and protocol-restricted links