Documentation
Install the editor, configure it, and control it from your code. 82 guides and reference pages.
Start here
Quick Start
Get RichTextEditor 2.6.12 running: choose a setup path, create your first editor, read and save HTML, and troubleshoot common setup problems.
Configuration Reference
Every RichTextEditor configuration option: core editor settings, smart typography, iframe safety, and more than 100 plugin options for AI, export, pagination, accessibility and content safety.
All Methods
Complete JavaScript API method reference for RichTextEditor instances: content, selection, commands, dialogs, and lifecycle methods.
AI Toolkit
Reference for the AI Toolkit: the Ask AI dialog, AI Chat, AI Review, the aiToolkitResolver hook, the operation contract, custom actions and BYOK.
Get started
How to install, set up and configure the editor.
Quick Start
Get RichTextEditor 2.6.12 running: choose a setup path, create your first editor, read and save HTML, and troubleshoot common setup problems.
Installation (div)
Install RichTextEditor on a div element: include rte.js, create the instance, and read or set HTML content from your own scripts.
Installation (textarea)
Install RichTextEditor on a textarea: the editor syncs HTML back to the form field automatically, so existing form posts keep working.
Initialization
RichTextEditor JavaScript global enables you to create, modify and interact with instances of the editor. This is the starting point for any integration.
Configuration
RichTextEditor can be configured in several ways to match your editing experience.
Configuration Reference
Every RichTextEditor configuration option: core editor settings, smart typography, iframe safety, and more than 100 plugin options for AI, export, pagination, accessibility and content safety.
Skin
Skin and theme configuration: switch toolbar skins, override CSS variables, and restyle the editor chrome to match your product.
Set and get content
The common ways to set and read RichTextEditor's HTML content from JavaScript, including reading it back before a form is submitted.
React state & cursor issues
Choose controlled or uncontrolled RichTextEditor React state. Save current HTML, prevent stale autosave responses and diagnose cursor jumps, remounts and Strict Mode cleanup.
Form validation & required fields
Validate a required RichTextEditor field without counting empty HTML as content. Synchronize the textarea, show accessible errors, and repeat validation on the server.
FAQ
Answers to common RichTextEditor integration, configuration, licensing, browser-support, and troubleshooting questions.
AI
AI writing tools and connecting your own provider.
AI Toolkit
Reference for the AI Toolkit: the Ask AI dialog, AI Chat, AI Review, the aiToolkitResolver hook, the operation contract, custom actions and BYOK.
AI providers, streaming & DOCX
Built-in OpenAI / Anthropic / Azure OpenAI provider resolvers, Server-Sent Events streaming, and server-side DOCX export.
BYOK key vault (per-tenant keys)
Charge AI traffic to each tenant's own provider account via the IAiKeyVault abstraction, with reference implementations, admin REST API, and cost ledger.
Documents & writing
Word export, page layout, structured content and input.
DOCX fidelity & security
The tested HTML-to-DOCX support matrix, request contract, review markup conventions, image security boundary, and intentional limits.
Pagination & legal numbering
Paginated page view (A4, Letter and Legal, with headers, footers and page numbers) and multi-level legal numbering, in the standard license.
Footnotes, format painter & case
Auto-numbered footnotes, a format painter that copies character formatting, and change case (UPPER, lower, Title, Sentence) - standard license.
Structured Content
RichTextEditor documentation for structured JSON, Markdown conversion, static HTML rendering, and validation.
Dictation
Speech-to-text via the Web Speech API. Toolbar microphone button, live interim transcripts, opt-in.
Mobile toolbar mode
Opt-in mobile stylesheet with 44x44 tap targets, horizontally-scrolling toolbar, sticky header, and bottom-sheet dialogs.
Collaboration
Comments, tracked changes and real-time editing.
Collaboration & Review
Reference for the collaboration and review plugins: Slash Commands, @Mentions, Track Changes, Comments, Revision History, and Yjs presence.
Per-node Yjs CRDT engine
How textSync: 'crdt' works inside: the per-node binding, awareness encoding, the per-author undo manager and the rte.js dispatcher.
Images & uploads
Uploading, storing and browsing images and files.
Upload files
Configure secure RichTextEditor file uploads with a custom handler, validation, progress callbacks, and server-side storage controls.
Image gallery path
Point the Insert Gallery dialog at your own images: the folder JSON contract, how a folder becomes a URL, and endpoint code for ASP.NET, ASP.NET Core and PHP.
Store images as files
Production image setup: create the upload and gallery folder, connect the upload handler, turn base64 embedding off, refuse base64 on the server, and move existing base64 images into files. ASP.NET Core, ASP.NET and PHP.
Fix image upload problems
Diagnose RichTextEditor image uploads step by step: missing requests, 403 and 413 errors, invalid responses, broken image URLs, and images lost after saving.
Cloud upload providers
Send uploads to S3, Azure Blob, Cloudinary, or any custom backend via IRichTextBoxUploadStore. Reference implementations included.
Customize & extend
Toolbars, commands, events and your own plugins.
API Basics
The editor exposes client-side methods for reading and updating content.
Toolbar & menu items reference
Every toolbar and menu item identifier RichTextEditor supports, grouped by category, for building custom toolbars in config.toolbar strings.
All Commands (execCommand)
Complete command reference for execCommand(): formatting, blocks, lists, tables, media, and dialog commands with their argument signatures.
All Properties
The read-only properties of a RichTextEditor instance, for reaching the editor's related objects from your own code. With examples.
All Methods
Complete JavaScript API method reference for RichTextEditor instances: content, selection, commands, dialogs, and lifecycle methods.
Handle events
runjsevent reference: wire toolbar buttons to your own JavaScript handlers and react to editor commands from application code.
Write your first plugin
Build a RichTextEditor plugin end to end: registration, config defaults, a toolbar button, a command, the event bus, and what it does to saved content.
Bundle size & plugin subsetting
Every plugin ships in all_plugins.min.js by default. Load only the plugins you use and the editor drops from 529 KB to 214 KB gzip. Measured presets for blog, documents, review and collaboration, with the script tags for each.
Accessibility & operations
WCAG conformance and running the editor in production.
Accessibility (WCAG 2.2 AA)
WCAG 2.2 Level AA conformance target, what works today, known gaps, and supported assistive technology combinations for RichTextEditor.
Accessibility checker rules
Every rule the built-in accessibility checker applies to editor content, what each one catches, which have a one-click repair, and the JavaScript API for running it yourself.
Production operations
Running RichTextEditor and RichTextBox.AspNetCore in production: rate limiting, HTTP retry, audit logging, health probes, idempotency and BYOK.
Method reference
Every editor method, one page each.
execCommandattachEventdetachEventgetHTMLCodesetHTMLCodegetPlainTextgetReadOnlysetReadOnlyisCommandEnabledisCommandActivesetContentCssTextsetPreviewCssTextinsertRootParagraphinsertByTagNamesurroundByTagNameinsertElementsurroundElementinsertTextinsertHTMLselectControlselectDoccollapsedeletefocuscommitBookmarkclearHistorynotifySelectionChangehtmlEncodehtmlDecodegetDocumentgetEditablegetSelectiongetSelectedControlgetSelectionElementgetSelectedTextgetJSON (bridge)setJSON (bridge)createToolbarButtoncreateToolbarDropDowncreateDialogcloseCurrentPopupsetImageForCommand
Events
Events the editor raises, and how to listen to them.
Rather see it running?
Every feature in these docs has a live demo you can edit and inspect.