Configuration Reference

This page lists the available editor configuration options. See Configuration for setup patterns and usage guidance.

On smaller screens, scroll the table horizontally to see every column. Keyboard users can focus the table area and use the arrow keys.

NameDefaultDescription
skindefaultHow the editor chrome looks. The value becomes a class on the container (rte-skin-<value>), so the theme ships dark, gray, blue and rounded-corner, and any name you style yourself also works. Leave it unset for the default light chrome. See skin.
toolbardefaultDefault, basic or full. Auto configures the toolbar with a set of buttons on desktop.
toolbarMobilemobileThe toolbar set on mobile devices.
maxWidthForMobile992When the screen (browser window) gets smaller than 992, editor should have mobile toolbar.
timeoutAddToUndo900When uses types fast, wait 900ms to add undo item.
enableDragDroptrueEnables or disables drag-and-drop support for the editor.
enableObjectResizingtrueSpecifies whether or not to allow the users resize an object winthin the RichTextEditor.
readOnlyfalseGets or sets a value which indicates whether the RichTextEditor should be an active HTML editor, or a read-only document viewer.
focusOnLoadfalseSpecifies whether the editor grabs focus when the page loads. If this property is set to true then the editor will take focus, if it is set to false it will not.
allowScriptCodefalseSpecifies whether to strip all script elements and script contents from the html to prevent javaScript injection. When this property is set to false (the default) Rich Text Editor strips all script elements and script contents from the html.
tagWhiteList[]The white list contains a list of tags that can be used in the editor.
tagBlackList[]The black list contains a list of tags that cannot be used in the editor.
maxHTMLLength0Gets or sets the maximum number of characters including the HTML tags allowed in the RichTextEditor. The default, 0, means no maximum. Over the limit the editor reverts to the last good state and raises the reachmaxlength customdialog hook.
maxTextLength0Gets or sets the maximum number of characters excluding the HTML tags allowed in the RichTextEditor. The default, 0, means no maximum. Over the limit the editor reverts to the last good state and raises the reachmaxlength customdialog hook.
styleWithCSSfalseHow Bold, Italic and Underline are saved. The default writes tags — <b>, <i>, <u>— which boldTag and italicTag rename, and which a screen reader announces as emphasis. Set true to save inline styles (<span style="font-weight: bold">) instead. Core 2.6.8 and later; before that the result depended on whether the plugin bundle finished loading first, so the same content could be saved either way.
pasteStripThemeStylestrueOn paste, drop inline styles that only repeat the editor’s own theme. Browsers write computed styles onto copied HTML, so text copied inside the editor used to arrive carrying the theme’s margin, font size and colour, and that was saved with the content. Styles the author set that differ from the theme are kept. Set false to keep every pasted style. Core 2.6.8 and later.
smartTypographytrueReplaces what the author types with typographic characters: straight quotes become curly quotes, two hyphens become an em dash, three full stops become an ellipsis, and (c), (r) and (tm) become ©, ® and ™. Nothing is changed inside code, pre or kbd. This belongs to the editor core and is separate from the autocorrect plugin, so autocorrectEnabled: false does not turn it off. Set false to keep exactly what is typed; the four options below switch each substitution on its own.
smartTypographyQuotestrueStraight double and single quotes become curly ones (“ ” ‘ ’), and an apostrophe inside a word becomes ’ (don’t).
smartTypographyDashestrueTwo hyphens become an em dash (—). A single hyphen is left alone.
smartTypographyEllipsistrueThree full stops become one ellipsis character (…).
smartTypographyTrademarkstrue(c), (r) and (tm) become ©, ® and ™.
sanitizerAllowIframestrueKeep <iframe> elements in the content. Applies while the content sanitizer is on (contentSanitizer, part of the plugin bundle). Only frames whose src is http or https survive; srcdoc, event handlers and javascript: URLs never do. With no sanitizerAllowedIframeHosts list, every kept frame is sandboxed to allow-scripts allow-same-origin allow-presentation: top-level navigation, pop-ups, modals and forms are withheld, and a frame from the page’s own origin also loses allow-same-origin. Set false to drop every iframe.
sanitizerAllowedIframeHosts[]Keep only frames from these hosts and their subdomains, for example ["www.youtube.com", "player.vimeo.com"]. The stronger control: set it whenever you know which embeds you expect.
maxUploadFileSize0Largest file the editor will insert or upload, in bytes. The default, 0, means no limit. Applies to the image and document dialogs, paste and drag-and-drop: over the limit the file is refused before it is read, so nothing is embedded in the document and nothing is sent to the upload handler. The message comes from text_uploadtoobig; handle the uploadtoobig customdialog hook to show your own dialog.
allowBase64ImagestrueWith no upload handler or file_upload_url, an inserted image is embedded in the HTML as a base64 data: URL. Set false to never embed: the image is refused with the text_base64disabled message (customdialog hook base64disabled), so an upload handler is then required. Core 2.6.5 and later.
base64ImageMaxSize204800Largest base64 image, in bytes, after shrinking (200 KB). A larger image is refused with the text_base64toobig message (customdialog hook base64toobig). 0 means no cap, which is the behaviour before core 2.6.5.
base64ImageShrinktrueResize and re-encode JPEG, PNG, WebP and BMP images in the browser before embedding them as base64. GIF and SVG are never re-encoded. Set false to embed the original bytes when they fit under base64ImageMaxSize. Core 2.6.5 and later.
base64ImageMaxDimension1600Longest side, in pixels, of an image shrunk for base64 embedding. Core 2.6.5 and later.
file_upload_urlnullURL the editor POSTs inserted, pasted and dropped files to, as multipart/form-data. Set this instead of writing a file_upload_handler. The response may be TinyMCE’s{"location": "..."}, CKEditor’s {"url": "..."} or {"urls": {"default": "..."}}, or READY:<url>; {"error": {"message": "..."}}and ERROR:<message> are failures, and so is any other body. A file_upload_handler takes precedence when both are set.
file_upload_fieldfileForm field name the file is sent under. CKEditor-style endpoints expect upload.
file_upload_base_pathnullPrepended to a relative URL returned by the endpoint, for serving uploads from a CDN.
file_upload_credentialsfalseSends cookies and HTTP auth with the upload, for an endpoint on another origin.
file_upload_reuse_filenamefalseSends the file under its original name. By default a unique name is generated, so two users uploading image.png cannot overwrite each other.
file_upload_headersnullExtra request headers for the upload, e.g. a CSRF token.
automaticUploadsfalseWhen true, the editor uploads images that are embedded in the content as base64 data: URLs without being asked: after setHTMLCode, and after inserted or pasted HTML. It runs uploadEmbeddedImages() for you, debounced by automaticUploadsDelay (300 ms), and does nothing when no file_upload_handler is configured.
automaticUploadsDelay300Milliseconds to wait before the automatic scan runs, so a paste of several images uploads once.
uploadRetryCount0Extra attempts after a failed upload, before the error reaches your handler’s callback and the user. Each attempt fires an uploadretry event. A cancelled upload, or one whose image has been deleted, is never retried.
uploadRetryDelay1000Milliseconds before the first retry. The wait doubles for each further attempt.
autoSavenullSaves the content to your own server as the user types: { onSave: function (html) { return promise; }, interval: 2000, indicator: true, retryCount: 3, retryDelay: 5000 }. onSave is required; returning a promise lets the editor show whether the save worked. A failed save is retried on a doubling delay, and again as soon as the browser comes back online. See the editor.autoSave methods for manual control.
editorResizeModebothboth, height or none. Gets or sets the resize mode.
toggleBordertrueSpecifies the ToggleBorder state. ToggleBorder is a handy function which allows you to see the borders without setting things to border = 1 or something like that in code.
showSelectedBlocktrueSpecifies whether or not to display the selected block winthin the RichTextEditor.
showFloatTextToolBarfalseSpecifies whether to display the FloatTextToolBar thar is defined by config.controltoolbar_TEXT.
showFloatLinkToolBarfalseSpecifies whether to display the FloatLinkToolBar thar is defined by config.controltoolbar_A.
showFloatImageToolBbarfalseSpecifies whether to display the FloatImageToolBbar thar is defined by config.controltoolbar_IMG.
showFloatTableToolBarfalseSpecifies whether to display the FloatTableToolBar thar is defined by config.controltoolbar_TD.
showFloatParagraphtrueSpecifies whether to display the FloatParagraph on the left side.
floatParagraphPosleftLeft or right. Gets or sets the position of FloatParagraph.
floatParagraphPosX0A Number, representing the horizontal coordinate of FloatParagraph, in pixels.
floatParagraphPosY0A Number, representing the vertical coordinate of FloatParagraph, in pixels.
showPlusButtontrueSpecifies whether to display the editor plus button.
showTagListtrueSpecifies whether to display the tag selector in the editor bottom bar.
showStatisticstrueSpecifies whether to display the content statistics in the editor bottom bar.
tabSpaces4Gets or sets the number of spaces to be inserted when the user hits the "tab" key.
enterKeyTagpDetermines what happens when the "enter" key is pressed in the editor. div, p or br.
htmlcode_forcehexformatfalseWrite colours as #993300 instead of rgb(153, 51, 0) in the saved HTML. The editor passes the picked colour through unchanged; it is the browser that normalises it to rgb() when the style is read back, so this option converts it on the way out. Applies to colours already present in loaded or pasted content as well as ones the user applies, and covers both text and background colour. rgba() is left alone because a 6-digit hex cannot carry its alpha channel.
paragraphClassparagraphThe specified class name will be added to the paragraph automatically when to create a new paragraph.
insertTableTag<table></table>Default table attributes when inserting a table.
insertRowTag<tr></tr>Default row attributes when creating table row.
insertCellTag<td><br/></td>Default cell attributes when inserting a cell.
url_base/richtexteditorThe folder the editor loads its own files from: the content and preview stylesheets, the preview script, the help page and the colour picker’s More page. From core 2.6.10, when you leave it unset it follows the folder rte.js was loaded from, so a CDN or sub-folder install needs no setting; before that it was always /richtexteditor. Set it to serve those files from somewhere else.
onready(none)From core 2.6.10: a function called once when the editor is built and its initial content is loaded (the ready event). Same as editor.attachEvent("ready", fn).
pasteMode"Auto"How pasted content is handled: "Auto" keeps formatting and cleans it, "PasteText" always pastes plain text, "PasteWord" always applies the Word clean-up, and "Disabled" refuses pasting. Ctrl+Shift+V pastes plain text in every mode except Disabled.
smartLinkPastetruePasting a URL while text is selected turns the selected text into a link instead of replacing it.
autoLinkPastetrueFrom core 2.6.10: a web address in pasted plain text (https://… or www.…) becomes a link; trailing punctuation stays outside it. Not applied for Ctrl+Shift+V or inside a link or code. Set to false to paste addresses as plain text.
linkDefaultProtocol"http://"From core 2.6.10: the protocol put in front of an address that has none, such as example.com typed in the link dialog or a pasted www. address. Set to "https://" to default to secure links.
pasteMarkdownfalseFrom core 2.6.10: when true, Markdown pasted as plain text (a README, a chat, an AI answer) is converted to formatted content: headings, bold, italic, links, lists, quotes and code blocks. Text that does not look like Markdown, Ctrl+Shift+V, and pastes inside code are left as plain text. The result is sanitized like any paste.
markdownShortcutsEnabledtrueMarkdown block shortcuts typed at the start of an empty paragraph: # to ###### headings, - / * bullets, 1. / 1) numbered lists (a number other than 1 sets the start), > quote, [ ] to-do item (with the to-do plugin), ``` code block, and --- + Enter for a rule. One Ctrl+Z gives the typed characters back.
markdownInlineEnabledtrueInline Markdown autoformat when the closing delimiter is typed: **bold**, *italic*, `code`, ~~strike~~. Text typed afterwards continues unformatted.
contentCssUrl%url_base%/runtime/
richtexteditor_content.css
Specifies the location of the style sheet that will be used by the editable area.
previewCssUrl%url_base%/runtime/
richtexteditor_preview.css
Specifies the location of the style sheet that will be used by the preview window.
previewScriptUrl%url_base%/runtime/
richtexteditor_preview.js
Specifies the location of javascript file that will be used by the preview window.
contentCssText""Gets or sets inline CSS text that will be used by the editable area. For example, "body{background-color:#eee}".
previewCssText""Gets or sets inline CSS text that will be used by the preview window. For example, "body{background-color:#eee}".
editorBodyCssClass""Gets or sets the class of editing area to switch styles.
editorBodyCssText""Gets or sets inline CSS text that will be used by the editable body.
editablePaddingTop2Sets the top padding (space) of the editable area.
editablePaddingBottom2Sets the bottom padding (space) of the editable area.
editablePaddingLeft2Sets the left padding (space) of the editable area.
editablePaddingRight2Sets the right padding (space) of the editable area.
zIndexFullPage9999Set the z-index for the editor opens in fullscreen mode.
zIndexFloat99999Set the z-index for the editor float toolbar.
zIndexDialog999999Set the z-index for the editor dialog.
zIndexDropDown9999999Set the z-index for the editor dropDown.
fontNameDropDownMinWidth90pxSet the min-width for the fontname dropDown.
fontNameDropDownMaxWidth110pxSet the max-width for the fontname dropDown.
tooltipAttributerte-tooltipSet the attribute for the editor tooltip.
showKeyboardShortcutsInTooltipstrueShow each toolbar button's keyboard shortcut in its tooltip ("Bold (Ctrl+B)", ⌘ on a Mac). The shortcut is shown in the tooltip only: dialog titles and the button's accessible name stay the plain label, and the button carries aria-keyshortcuts.
keyboardShortcutHints{ bold: "Ctrl+B", italic: "Ctrl+I", ... }The shortcut shown for each command, keyed by command name. Add or replace entries to match shortcuts you bind yourself. Keep shortcuts out of the text_* labels: a label is also a dialog title and an accessible name, and a language pack replaces it.
commentMentions[]The people a comment can mention, as an array of { id, name }. Typing @in the comment composer lists them; choosing one inserts "@Name" and records the mention on the comment. Empty means no mention list (comments plugin).
text_uilocaleset by each language packThe locale of the loaded language pack (for example zh-Hans, de). The editor uses it to name languages in the text-part language menu and Ask AI's Translate list, and to write date chips, through the browser's Intl API. With no pack loaded, English is used.
controlSelectionClassrte-control-selectedSet the Class for the editor control selection.
controlSelectionMargin7Set the Margin for the editor control selection.
altTextHinttrueImages with no alt text, or an empty one, get a dashed amber outline in the editing area so authors see what still needs a description. Only in the editor; nothing is added to the saved HTML. Set false to hide the outline.
autoHeadingAnchorstrueGives every heading an id made from its text ("Hello World" becomes hello-world) a moment after each change, so links and a table of contents can point at it; a duplicate gets -2, -3. Set false to stop the core assigning ids. With the plugin bundle loaded, the document outline plugin then keeps heading ids unique itself.
autoLinkOnTypetrueA URL or e-mail address typed into the text becomes a link when the space after it is typed. Set false to leave typed addresses as plain text.
backspaceOutdenttrueBackspace at the very start of a list item takes that item out of the list as a paragraph instead of joining it to the item above. Set false to join instead.
blockDragHandlestrueHovering a block (paragraph, heading, list, table...) shows a drag handle beside it; drag the handle to move the block. Set false to hide the handles.
collabEnabledtrueLets the collaboration plugin (yjscollab) set up editor.collab. Set false and the plugin does nothing: there is no editor.collab. Collaboration only starts when you call editor.collab.attach(...); this default alone opens no connection. See collaboration.
collabShowPresencetrueWhen a collaboration session is attached, show the panel listing the other people in the document. Set false to hide it.
collabShowRemoteCursorstrueWhen a collaboration session is attached, show other people's carets and selections over the text. Set false to hide them.
collabTextSyncfalseWhat a collaboration session synchronises besides presence and the review ledger (yjscollab plugin): false - no document text; true - snapshots of the whole document in a shared Yjs text; "crdt" - character-level merging through the CRDT engine (crdt-engine.min.js), which falls back to snapshots when the engine is not loaded.
collabRequireCrdtfalseWith collabTextSync: "crdt", if the CRDT engine is missing turn text synchronisation off instead of falling back to snapshots (presence and the review ledger stay on); the console says why.
collabTextNamerichtextbox.bodyThe name of the shared Yjs text that snapshot synchronisation uses. Give each editor in one Yjs document its own name.
aiToolkitEnabledtrueThe AI Toolkit plugin. Set false to turn it off: no AI buttons, menus or dialogs. See AI Toolkit.
aiToolkitResolvernullThe function the AI Toolkit calls to reach your AI service (bring your own key or endpoint); editor.aiToolkit.setResolver(fn) sets it at run time. Without one the toolkit runs in demo mode. The AI Toolkit page describes the request and the reply.
aiToolkitAgentnullThe function editor.aiToolkit.runAgent(prompt) uses to plan and apply multi-step edits; setAgent(fn) sets it at run time. With none, runAgent rejects with a message saying so.
aiToolkitAutoToolbarButtonstrueAdd the AI buttons to the toolbars automatically. Set false to place the AI commands in your own toolbar string.
aiToolkitActions(built-in list)The actions in the AI menu: an array of { id, section, icon, title, description }. Replace it to show your own set.
aiToolkitDialogModes(built-in list)The modes of the Ask AI dialog (Proofread, Rewrite, Translate...): an array of { id, title, description }.
aiToolkitChatPrompts(built-in list)The starter prompts AI Chat offers: an array of { id, label, prompt }.
aiToolkitTranslateLanguages(Spanish, French, German, Italian...)The languages Translate offers: an array of { value, label }.
aiToolkitOperationHandlersHandlers for operation types an AI reply may contain, by type: { myType: function (operation, context) { ... } }; return true when the handler applied the operation. editor.aiToolkit.registerOperationHandler() adds one at run time.
aiToolkitPersistenceKey(empty)A key for this document. Set it and the AI review state (suggestions and decisions) is kept in the browser's localStorage under RTE.AIToolkit.<key>, so it survives a reload; it also identifies the document to aiToolkitSuggestionLedgerUrl. Empty, nothing is stored.
aiToolkitReviewLogUrl(empty)A URL on your server that receives each AI review decision as a JSON POST, for an audit log. Empty, nothing is sent.
aiToolkitSuggestionLedgerUrl(empty)A URL on your server that receives the document's AI suggestions and their states as a JSON POST, so they can be shared or restored; needs aiToolkitPersistenceKey. Empty, nothing is sent.
aiToolkitReviewSyncInterval15000How often review state is synchronised with your server, in milliseconds (at least 5000).
collabLedgerMapNamereviewLedgerThe name of the shared Yjs map that carries comments, suggestions and AI review decisions between peers.
onCollabStatusnullCalled with { attached, textSyncMode, requestedTextSync, fallbackReason, yjsBridge, peerCount } when a session starts, so you can show which mode is in effect (for example a fallback from CRDT to snapshots). The same object is returned by editor.collab.getStatus().
imageHoverQuickBartrueHovering an image in the editor shows a small bar of image actions over it. Set false to hide it.
imageLazyLoadtrueImages the editor inserts (from a URL, an upload or a drop) get loading="lazy" and decoding="async", so a long document does not load every picture at once. Set false to insert images without them.
indentUseMargintrueIndent and Outdent on a paragraph or heading change its margin, as Word does (margin-left on left-to-right text). Set false to change its padding instead. The step is indentation.
inlineMathtrueLets editor.applyMathMarkup() wrap $...$ runs in <span class="rte-math-inline" data-tex="...">, for a math renderer such as KaTeX or MathJax to draw. Nothing happens until you call it. Set false and the call changes nothing.
placeholderShowOnlyWhenEditabletrueHide the placeholder while the editor is read-only (readOnly or setReadOnly(true)) or in comments-only mode, and show it again when editing is allowed. Set false to show it in a read-only editor too. (In 2.6.11 and earlier a read-only editor still showed it.)
showFloatLinkUrlPreviewtrueWhen the caret is in a link, the floating link toolbar starts with the link's address, which opens in a new tab when clicked. Set false to show the toolbar buttons only.
smartPasteToasttrueAfter a paste from Word or Google Docs has been cleaned up, a short notice says so. Set false to clean up silently.
tableColumnResizetruePointing at the border between two table columns shows a resize cue; drag it to change the column width. Set false to turn column resizing by drag off.
tableRowResizetruePointing at the bottom edge of a table row shows a resize cue; drag it to change the row height. Set false to turn row resizing by drag off.
aiContextMenutrueWith the AI Toolkit loaded, right-clicking selected text (three characters or more) opens a menu of AI actions on that text. Set false to keep the browser's own menu.
wordExportFileName(none)Base file name for editor.exportToWord() (a Word-compatible .doc) when no name is passed. Unset, the first h1-h3 heading's text is used, or "document".
wordExportFontFamilyCalibri, 'Segoe UI', Arial, sans-serifBody font of the .doc export. An option passed to exportToWord() wins.
wordExportFontSize11ptBody font size of the .doc export.
wordExportPageSize8.5in 11inPage size of the .doc export, as a CSS @page size (US Letter by default; "21cm 29.7cm" for A4). A page setup the document already carries (page view) takes precedence.
wordExportMargin1inPage margins of the .doc export, as a CSS length or shorthand. A page setup the document carries takes precedence.
wordExportLandscapefalseLandscape pages in the .doc export. A page setup the document carries takes precedence.
docxExportFileName(none)Base file name of the .docx export when no name is passed. Unset, it is Export- followed by the date and time (YYMMDD-HHMMSS, e.g. Export-261026-153045.docx).
docxExportTitle(none)The title stored in the .docx file's properties. Unset, the page's document.title, or "Document".
docxExportAuthorRichTextEditorThe author stored in the .docxfile's properties.
pdfExportFileName(none)Base file name of the PDF export when no name is passed. Unset, it is Export- followed by the date and time (YYMMDD-HHMMSS).
pdfExportTitle(none)The title stored in the PDF's metadata. Unset, the page's document.title, or "Document".
pdfExportAuthor(empty)The author stored in the PDF's metadata.
pdfExportFonthelveticaThe font of the vector PDF export (pdfexport plugin): "helvetica", "times" or "courier", the standard PDF fonts, which need no embedding. They cover Western European Latin only; see pdfExportRasterFallback.
pdfExportBaseFontSize11The body text size of the vector PDF, in points; headings scale from it.
pdfExportHeader(none)Plain text centred at the top of every page of the vector PDF; {page} and {total}become the page number and the page count. Unset, the text of the document's page header (page view), if any.
pdfExportFooter(none)Plain text centred at the bottom of every page, with the same {page} and {total}.
pdfExportRasterFallbacktrueWhen a document has characters the vector PDF cannot encode (anything outside Western European Latin: Chinese, Japanese, Korean, Cyrillic, Greek, Arabic...), exportToPdf() and the toolbar's Export PDF use the html2pdf raster export instead, which draws every script, and say so in the console. editor.getPdfUnsupportedText()lists those characters. Set false to always write the vector PDF; those characters then print as "?". In 2.6.11 and earlier they always printed as "?".
pdfExportUnicodeFont(none)The bytes of a TrueType font (.ttf, as an ArrayBuffer or Uint8Array) for the text the standard fonts cannot draw: Chinese, Japanese, Korean, Cyrillic, Greek... With it, the vector PDF embeds the glyphs the document uses (a few hundred KB even from a large CJK font) and that text stays selectable and searchable; without it, see pdfExportRasterFallback. editor.loadPdfFont(url) fetches a font you serve and sets this; nothing is fetched unless you call it. CFF (.otf) and collection (.ttc) files are refused with a console message.
mentionTrigger@The character that opens the mention list (mentions plugin). The list only works once mentionStaticList or mentionSource is set.
mentionStaticListnullA fixed list of people for the default trigger: an array of { id, label (or name), subtitle (or email) }. Typing after the trigger filters it on the label, subtitle and id, ignoring case; with nothing typed the first 50 show.
mentionSourcenullA function that supplies the list for the default trigger: (query, { trigger }) => an array of items, or a Promise of one. Takes precedence over mentionStaticList. For more triggers use mentionTriggers or editor.mentions.register().
mentionTriggersnullExtra triggers, each { trigger, source (or search), insertClass, label, renderItem, renderInsert }, for example # for tags. search(query, done) callbacks and async functions are accepted. A trigger with neither source nor search is skipped with a console warning.
mentionMaxItems8The most results the list shows.
mentionDebounceMs150How long typing must pause before the source is asked again, in milliseconds. Just after the trigger (nothing typed yet) it is asked at once.
mentionInsertClassrte-mentionThe class on the inserted mention element. A trigger can set its own insertClass.
slashCommandTrigger/The key that opens the slash command menu (slash command plugin), typed at the start of a line or after a space, and never inside code or pre.
slashCommandMaxItems40The most commands the slash menu lists at once.
documentOutlineEnabledtrueThe document outline panel (documentoutline plugin): a list of the document's headings to jump between. Set false for no Outline toolbar button and no panel.
documentOutlineAutoOpenfalseOpen the outline panel when the editor starts.
documentOutlineMinLevel1The highest heading level the outline lists (1 to 6).
documentOutlineMaxLevel6The lowest heading level the outline lists (1 to 6, not above documentOutlineMinLevel).
documentOutlineTitle"Outline" (translated)The panel's title and accessible name. Unset, the language pack's text is used.
documentOutlineHint(translated text)The line under the panel title.
documentOutlineEmptyText(translated text)What the panel says when the document has no headings.
contentMinimapEnabledtrueThe minimap panel (contentminimap plugin): a small preview of the whole document to click and jump. Set false for no Minimap toolbar button and no panel.
contentMinimapAutoOpenfalseOpen the minimap panel when the editor starts.
contentMinimapWidth168The panel's width in pixels (at least 148).
contentMinimapScale0.14How small the preview draws the document (0.14 = 14% of its size).
contentMinimapTitle"Minimap" (translated)The panel's title and accessible name.
contentMinimapHint(translated text)The line under the panel title.
contentMinimapEmptyText(translated text)What the panel says while the document is empty.
accessibilityCheckerEnabledtrueThe accessibility checker panel (accessibilitychecker plugin), which lists problems such as skipped heading levels, images without alt text and tables without headers, with repairs. Set false for no toolbar button and no panel.
accessibilityCheckerAutoOpenfalseOpen the accessibility checker panel when the editor starts.
accessibilityCheckerTitle"Accessibility" (translated)The panel's title and accessible name.
accessibilityCheckerHint(translated text)The line under the panel title.
accessibilityCheckerEmptyText(translated text)What the panel says when it finds no issues.
contentAriaLabel(none)The accessible name of the editing area and the title of the editor's frame (a11yenhance plugin), followed by the Escape hint, e.g. "Article body Press Escape to leave the editing area.". Unset, the language pack's "Rich text editor. Editing area.". Give each editor on a page its own name.
contentLabel(none)Used as contentAriaLabel when that is not set.
a11yEditorLabel(none)Used as the editing area's name when neither contentAriaLabel nor contentLabel is set (keyboarda11y plugin). In 2.6.11 and earlier it had no effect with the plugin bundle loaded.
a11yEscapeHint"Press Escape to leave the editing area." (translated)The words added after the editing area's name, telling keyboard users how to leave the editor.
contentLang(the page's lang)The lang of the editing document, for spell checking and screen reader pronunciation. Unset, it follows the host page's <html lang>, or en.
a11yReadOnlySuffix"Read only."What screen readers are told when the editor becomes read-only.
a11yEditableAgain"Editing enabled."What screen readers are told when the editor leaves read-only.
a11yRovingToolbartrueThe toolbar is one Tab stop and the arrow keys move between its buttons (the ARIA toolbar pattern). Set false to make every button its own Tab stop.
commentHighlightBg#fff9c4Background colour of commented text (comments plugin).
commentHighlightBorder#f9a825Colour of the line under commented text.
trackChangesInsertClassrte-tc rte-tc-insertClass of the element that wraps a suggested insertion (suggesting mode). Change it to style suggestions your own way.
trackChangesDeleteClassrte-tc rte-tc-deleteClass of the element that wraps a suggested deletion.
onReviewDecisionDeniednullCalled with { entry, action, user } when reviewCanDeciderefuses someone's Accept or Reject, so you can tell them why.
reviewCanDecidenullA function (entry, action, user, editor) that decides whether this user may accept or reject a suggestion; return false to refuse. If it throws, the decision is refused.
restrictedEditingModefalseLock the document except for regions marked data-rte-editable="true" (restricted editing plugin), like a Word form with fillable fields. editor.restrictedEditing marks regions, turns the lock on and off and moves between regions.
pageHeaderHtml(empty)HTML repeated at the top of every page in page view (pagination plugin); {page} and {total}become the page number and the page count. A header set in the document's page setup takes precedence.
pageFooterHtml(empty)HTML repeated at the bottom of every page in page view, with the same {page} and {total}.
readabilityWordsPerMinute200Reading speed used for the reading-time estimate (readability statistics plugin).
maxLength0The most characters the document may hold (character limit plugin); 0 means no limit.
maxWords0The most words the document may hold; 0 means no limit.
charLimitEnforcetrueStop typing and pasting past maxLength / maxWords. Set false to only count and report (editor.isOverLimit(), the charlimit event).
charLimitShowCountertrueShow the floating counter while a limit is set.
sanitizerAllowTags[]Extra element names the content sanitizer keeps (sanitizer plugin): exact names, "x-*" wildcards or regular expressions, e.g. ["custom-el", "x-*", /^ui-/]. Script and other executable elements are never kept.
sanitizerAllowAttributes[]Extra attribute names the sanitizer keeps, in the same forms, e.g. ["data-cms-*"]. Event-handler attributes (on*) are never kept.
sanitizerAllowStyleTagsfalseKeep <style> blocks inside the content. Off by default: a style block in a document restyles the page it is shown on.
sanitizerGuardLiveDomtrueAlso watch the editing area itself and clean it again when executable content appears there by any route - scripts, on* attributes, javascript: URLs - not only by paste and setHTMLCode(): content arriving through collaboration sync, another script on the page or a browser extension. Set false to clean only what goes through the editor's own paths. The sanitizer runs in the browser; check content on your server too.
documentImportModereplaceWhat importing a file does (document import plugin): "replace" the document or "insert" at the caret. Replacing is one undo step.
documentImportAccept.md,.markdown,.html,.htm,.txt,.doc,.docxThe file types the import dialog offers.
documentImportImagestrueBring the pictures inside an imported .docx in, as data URIs. Set false to skip them for image-heavy files.
documentImportResolver(none)A function (file) => HTML (or a Promise of it) that converts a file yourself, for example on your server. Return a string to take over; anything else, or a rejected Promise, falls back to the built-in reader.
dictationEnabledfalseTurn on dictation (dictation plugin): speech typed into the document through the browser's speech recognition (Web Speech API). Off by default. In some browsers, such as Chrome, recognition runs on the browser vendor's servers, so the audio leaves the user's device; check that this is acceptable before enabling it.
dictationLang(the browser's language)The language to recognise, as a BCP-47 tag such as en-US. Unset, navigator.language.
dictationContinuoustrueKeep listening across pauses. Set false to stop after one utterance.
dictationInterimResultstrueShow the partial transcript while the user is still speaking.
dictationAutoPunctuationtrueCapitalise the first letter of each dictated phrase and end it with a full stop when it has no punctuation of its own.
commentsEnabledtrueThe comments plugin (inline comments, replies, resolve). Set false to turn it off.
trackChangesEnabledtrueThe track changes plugin (suggesting mode, accept and reject). Set false to turn it off.
currentUsernull{ id, name, color } - who is editing. Comments, suggestions, revision history and collaboration record this person as the author; set it whenever you know the user.
mentionEnabledtrueThe mentions plugin. Set false to turn it off. Mentions only appear once a source is set (mentionStaticList, mentionSource or mentionTriggers).
slashCommandEnabledtrueThe slash command menu (slash command plugin). Set false to turn it off.
slashCommandIncludeAitrueList the AI Toolkit's actions in the slash menu when the AI Toolkit is loaded. Set false to leave them out.
slashCommandsnullExtra commands for the slash menu, registered at start-up: an array of { id, section, title, description, keywords, iconSvg, run }, as editor.slashCommands.register() takes.
galleryEndpoint(none)A URL the gallery dialog asks for folders and images (insertgallery plugin). It returns { currentFolder, currentFolderDisplay, parentFolder, folders: [{ folder, name }], images: [{ url, name, folder, size, source, alt }] }. Unset, the gallery shows only galleryImages and makes no request.
nodeTypesEnabledtrueThe custom node type registry (nodetypes plugin). Set false to turn it off.
nodeTypes(none)Node types to register at start-up, as editor.nodeTypes.register() takes: { name, match, inline, atomic, toJSON, fromJSON, toMarkdown }. A registered element keeps its markup through the sanitizer and gets a Markdown form you choose instead of falling back to its text.
rubyAnnotationEnabledtrueRuby annotations (rubyannotation plugin): reading guides above East Asian text, written as <ruby> with <rt>. Set false to turn it off.
rubyAnnotationParenthesestrueWrite <rp>parentheses around each reading, so a reader without ruby support shows "base(reading)" instead of running the two together.
stateInspectorEnabledtrueThe state inspector (stateinspector plugin): a developer panel showing the document's structure, structural problems and a copyable snapshot for bug reports. Set false to turn it off.
stateInspectorToolbarButtonfalseAdd a toolbar button that opens the state inspector. Off by default; open it with editor.stateInspector.open().
stateInspectorAutoOpenfalseOpen the state inspector when the editor starts.
stateInspectorLogLimit60How many recent editor events the inspector keeps (10 to 500).
stateInspectorMaxDepth24How deep the inspector walks the document tree (at least 2).
stateInspectorTitleState inspectorThe panel's title.
stateInspectorHint(text)The line under the panel title.
stateInspectorEmptyTextNo content to inspect yet.What the panel says while the document is empty.

Dropdown Customization

NameDefaultDescription
paragraphItemsNormal,H1,H2,H3,H4,H5,H6A predefined set of format blocks.
fontSizeItems8,9,10,11,12,13,14,16,
18,24,36,48,60,72,96
A predefined set of font sizes.
fontNameItemsArial,Arial Black,Comic Sans MS,
Courier New,Tahoma,Georgia,Helvetica,
Segoe UI,Sans-Serif,Impact,
Times New Roman,Verdana
A predefined set of font names.
lineHeightItems100%,150%,200%,250%,300%,
350%,400%,450%,500%,600%
A predefined set of line height items.
inlineStyles[["Red", "color:red", "color:red"],
["Bold", "font-weight:bold", "font-weight:bold"],
["Mark", "my-cls-mark"],
["Warning", "my-cls-warning"]]
Default CSS styles for inline styles dropdown.
[text,css style, display style]
paragraphStyles[["Red", "color:red"],
["Bold", "font-weight:bold"],
["Quote", "my-cls-quote"],
["Large Center", "my-cls-largecenter"]]
Default CSS styles for paragraph styles dropdown.
[text,css style, display style]
imageStyles[["Border", "border:solid 1px gray"],
["Shadow", "box-shadow:0 0 8px gray"],
["Margin10", "margin:10px"],
["Padding:10", "padding:10px"]]
Default CSS styles for image Styles dropdown.
[text,css style]
linkStyles[["Margin10", "margin:10px"],
["Padding:10", "padding:10px"],
["BigText", "font-size:36px"]]
Default CSS styles for link Styles dropdown.
[text,css style]
galleryImages[]Preset images for the gallery dialog: a URL, [url, text] or { url, name, alt }. Empty by default (until 2.6.11 it listed six sample images on richtexteditor.com, fetched from our server whenever the gallery opened). See image gallery.
htmlTemplates[]Templates the Insert Template dialog offers: [title, html] or { title, html, description }. Empty by default (until 2.6.11 it shipped two demo templates both named "My Doc 1"); with none the dialog says so.
characterItemsA predefined set of characters.
foreColorItemsA predefined set of fore colors.
backColorItemsA predefined set of background colors.
linkItems[]Addresses the Insert Link dialog suggests, e.g. ["/about", "/contact"]. Empty by default (until 2.6.11 it suggested five big-company sites); with no items the suggestion arrow is hidden.
imageItems[]Addresses the Insert Image (by URL) dialog suggests. Empty by default; with no items the arrow is hidden.

Plugin options

The options above configure the core editor. Everything below is contributed by the bundled plugins in richtexteditor/plugins/. Set them the same way — in the constructor’s options object, or globally on RTE_DefaultConfig before an editor is created.

Source-build preview: newer plugin options

These options exist in the current source plugins, but are not included in every released bundle or this site's current demo assets. Use a matching tested plugin build; setting an option does not add a missing feature to an older runtime.

OptionDefaultDescription
aiToolkitImageResolvernullImage-generation builds: (prompt: string) => Promise<string>. Your resolver returns an HTTPS image URL or a PNG/JPEG/WebP/GIF image data URL, at most 6,000,000 characters. The plugin does not call a provider by itself. Keep provider credentials on your server; apply your upload/storage policy before saving generated images.
commentMentions[]Comment-mention builds: [{ id, name }] supplies the people suggested after @ in the comment composer. A picked person's id/name is kept with the comment. This is a suggestion list, not authorization or a notification/email service; your application must provide those separately.
tableRowDragtrueRow-drag builds: set false before creating the editor to hide row drag grips. Header rows stay fixed. Merged/ragged tables, read-only/comments-only content and suggesting mode refuse unsupported moves; a row move is not recorded as a suggestion. Escape cancels a drag.
tableColumnDragtrueColumn-drag builds: set false before creating the editor to hide column drag grips. Moves cells in all rows together with the column width; a row-number column stays first. Merged/ragged tables and read-only/comments-only or suggesting mode refuse unsupported moves. Escape cancels a drag.

AI

Every AI surface is bring-your-own-key: the editor calls a function you supply and never talks to a provider itself.

OptionDefaultDescription
ghostTextfalseEnable inline grey-text completion. Tab accepts, Esc dismisses.
ghostTextResolvernullasync ({ before }) => string. Required for ghostText to do anything.
aiToolkitReviewLegacyLayouttrueUse the previous AI Review drawer layout.
aitoolkit_skip_auto_csstrueSkip auto-injection of the AI Toolkit stylesheet when you ship your own.

Typing and authoring aids

Behaviour that fires as the author types. All can be switched off individually.

OptionDefaultDescription
autocorrectEnabledtrueMaster switch for the autocorrect plugin. It does not turn off the editor core's smart typography - see smartTypography.
autocorrectCapitalizetrueCapitalise the first letter of a sentence.
autocorrectSpellingtrueApply the built-in common-misspelling list.
autocorrectTypographytrueSmart quotes, dashes and ellipses made by the autocorrect plugin. The editor core makes the same substitutions on its own; to stop them, set smartTypography to false.
autocorrectReplacementsnullYour own { from: to } replacement map, merged with the built-ins.
emojiAutocompleteEnabledtrueType :shortcode: to insert an emoji.
emojiShortcodes{ … }Override or extend the shortcode-to-emoji map.
foldHeadingsEnabledtrueCollapsible headings in the editing surface.
typewriterModeEnabledfalseKeep the caret line vertically anchored while typing.
typewriterAnchor0.5Where the caret line sits, 0 (top) to 1 (bottom).
focusModeEnabledfalseDim every block except the one holding the caret.
dragHandleEnabledtrueShow the block drag handle in the gutter.
dragHandleKeyboardtrueAllow keyboard block reordering (Alt+Up / Alt+Down).
formattingMarkPilcrowtrueShow pilcrows when formatting marks are on.
formattingMarkBlockstrueOutline block boundaries when formatting marks are on.
formattingMarkInvisiblestrueReveal spaces, tabs and non-breaking spaces.
permanentPenClass"rte-pen"Class applied to permanent-pen text.
permanentPenStyle{ … }Inline style object for permanent-pen text.
titleCaseSmallWords"a an and as at …"Words left lowercase by Change Case → Title Case.
formatPainterProperties[ … ]Which CSS properties the format painter copies.
readabilityStatstrueShow reading-ease statistics in the status bar.
localDraftfalseKeep a local draft so content survives an accidental reload.

Blocks, structure and references

Structural content: callouts, columns, numbered lists, footnotes, cross-references and a table of contents.

OptionDefaultDescription
text_inlinecode"Inline code"Toolbar label and tooltip for the inline-code button (command "inlinecode", emits a bare <code> element).
calloutTypes[ … ]Available callout kinds (info, warning, …).
calloutDefaultType"info"Callout kind inserted when none is chosen.
columnsDefaultCount2Columns created by the column block.
legalListClass"rte-legal-list"Class applied to multi-level legal lists.
legalListSeparator"."Separator between level numbers (1.1.1).
legalListSuffix"."Trailing character after the last level.
lineNumberStart1First line number.
lineNumberInterval1Show every Nth line number.
lineNumberRestart"continuous""continuous" or restart per page.
lineNumberGutter38Gutter width in pixels.
footnotesTitle"Footnotes"Heading rendered above the footnote list.
footnotesNumbering"decimal"Marker style for footnote numbering.
footnotesMarkerPrefix""Text before each footnote marker.
footnotesMarkerSuffix""Text after each footnote marker.
crossRefFigureLabel"Figure"Label used when referencing a figure.
crossRefTableLabel"Table"Label used when referencing a table.
crossRefMissingText"[reference not found]"Shown when a cross-reference target is gone.
tocTitle"Contents"Heading for the generated table of contents.
tocMinLevel1Shallowest heading level included.
tocMaxLevel3Deepest heading level included.
tocPageNumbers"auto"Show page numbers in the table of contents.
mathDialogSamples[ … ]Starter equations offered in the equation dialog.
tableNumberSeries"numeric"Numbering series for table row numbers.
tableNumberHeader"#"Header text for the row-number column.

Page layout, export and import

Everything that turns the document into a file or a printed page. Export runs in the browser; nothing is uploaded.

OptionDefaultDescription
paginationEnabledfalseShow the document as discrete pages.
pageFormat"A4"Page size used by pagination and export.
pageOrientation"portrait""portrait" or "landscape".
pageMargins{ top: 1, right: 1, bottom: 1, left: 1 }Margins in inches.
paginationShowPageNumberstrueRender page numbers in page view.
paginationShowPageCounttrueRender "of N" alongside page numbers.
docxExporttrueEnable .docx export (written in the browser, no server).
wordExporttrueEnable the Word-compatible HTML export.
documentImporttrueEnable .docx import.
pdfExporttrueEnable the vector, tagged-PDF export.
html2pdfScriptUrlnullPath to html2pdf for the raster PDF path; omit to keep the vector path only.
markdownExportEnabledtrueEnable Copy / Download as Markdown.
emailWrapWidth640Table width used by the email-HTML export.
emailInlineProperties[ … ]CSS properties inlined onto elements for email clients.
watermarkText"DRAFT"Watermark text.
watermarkImagenullImage watermark; overrides the text watermark.
watermarkMode"tile""tile" or a single centred mark.
watermarkOpacity0.18Watermark opacity, 0 to 1.
watermarkAngle-30Rotation in degrees.
watermarkColor"#94a3b8"Watermark colour.
watermarkFontSize48Watermark font size in pixels.
watermarkPrintfalseInclude the watermark when printing.

Media, links and data

Resolvers let you supply your own data source. Each is a plain function, so your endpoint and credentials stay yours.

OptionDefaultDescription
autoEmbedEnabledtrueTurn a pasted YouTube or Vimeo URL into a responsive embed.
autoEmbedResolvernull(url) => https embed URL, or null to decline. Add your own providers.
bookmarkResolvernull(url) => metadata for link-preview cards.
bookmarkFaviconService"/favicon-proxy?domain="Favicon endpoint for bookmark cards. Point it at your own proxy.
diagramResolvernullSupply a Mermaid renderer; none is bundled.
diagramSamples[ … ]Starter diagrams offered in the insert dialog.
chipResolvernull(query) => smart-chip items.
chipDateFormatnullFormat string for date chips.
mergeFields[ … ]Available merge fields.
mergeFieldPrefix"{{"Opening delimiter.
mergeFieldSuffix"}}"Closing delimiter.
mergeFieldMissing"placeholder"What to render when a field has no value.

Language, direction and accessibility

The editor ships 67 languages. Direction and accessibility behaviour are configurable on top.

OptionDefaultDescription
defaultTextDirectionnull"ltr", "rtl", or null to inherit.
textDirectionAutoDetectfalseDetect direction from the text being typed.
textDirectionSwapAligntrueMirror alignment when direction flips.
rtlUserInterface"auto"Mirror the toolbar and dialogs for RTL locales.
a11yEnhancetrueAccessible names and roles on editor chrome.
dialogA11ytrueFocus trapping and labelling inside dialogs.
keyboardA11ytrueRoving tabindex on toolbars so Tab escapes the editor.
readAloudRate1.0Speech rate for read-aloud.
readAloudHighlighttrueHighlight text as it is spoken.
textPartLanguages24 languagesLanguages offered by the Language dropdown: [{ code, label, dir }]. WCAG 3.1.2.
textPartLanguageHighlighttrueDotted underline on marked phrases while editing. Editor-only; never serialized.

Editing surface and regions

Reaching positions that have no node to hold a caret, and driving several editable regions from one toolbar.

OptionDefaultDescription
gapCursorKeystrueArrow/Home/End escape a table or other trapping block at a document edge.
gapCursorClicktrueClick the blank space around content to insert a paragraph there.
gapCursorHinttrueShow an insertion hint at a zero-height boundary between two blocks.
multiRootGroupnullInstances sharing this group name act as one editor with a single visible toolbar.
multiRootNamecontainer idThis region's name in the group API (getHTML, focusRoot, …).
multiRootToolbarHostnullElement (or its id) to move the active toolbar into. null leaves it in place.
layoutTableOutlinetrueDashed outline around layout tables while editing. A table marked role="presentation" is invisible by design; this is the only way to see what you are editing. Editor-only.
shadowStyleAdoptiontrueCopy the editor's stylesheets into the shadow root that contains it. Without this the editor edits correctly but renders entirely unstyled there, because no document stylesheet crosses a shadow boundary. Costs nothing outside a shadow root.
shadowStyleSourcesnullExtra stylesheet URLs to copy across the shadow boundary as well — your own skin overrides. String or array.

Styles from your own CSS

Fill the Quick Styles dropdowns from the classes already in the page's stylesheets instead of retyping them into config.

OptionDefaultDescription
importStylesfalseMaster switch. Opt-in, because on a utility-CSS page the class list is enormous.
importStylesSheetsnullWhich sheets to read: string or RegExp matched against href, or a function. null = all readable.
importStylesExclude/^(rte|ck|mce|…)/Class-name blocklist applied on top of the automatic editor-CSS exclusion.
importStylesFilternull(className, selector, bucket) => false to skip, or a string to relabel.
importStylesReplacefalseReplace the configured styles rather than appending to them.
importStylesLimit100Cap per dropdown. What it drops is reported, never silently truncated.

Content safety and checking

Filtering and validation. These are the options a security review will ask about.

OptionDefaultDescription
contentSanitizertrueAllowlist filter on input, output and the live DOM. Leave it on.
spellCheckEnabledtrueMark the editable spellcheck="true" for the browser checker.
spellCheckResolvernull(text) => [{ word, offset, length, suggestions }] from any service you license.
linkCheckResolvernull(urls) => reachability results for the link checker.
linkCheckMixedContenttrueFlag http:// links on an https:// page.
linkCheckUnsafeSchemes["javascript:", "data:", …]Schemes reported as unsafe.

Revision history

Named versions of the document, kept in the browser and optionally sent to your server.

OptionDefaultDescription
revisionHistoryEnabledtrueSet to false to turn the revision history plugin off.
revisionHistoryKey(page path + query)From core 2.6.10: the key THIS document's versions are stored under. Set it to the record id in a CMS, especially when the URL does not identify the document. Earlier builds shared one list across the whole site.
revisionHistoryMaxEntries50Versions kept; the oldest are dropped first.
revisionHistoryAutoSnapshotMs0Take a version automatically every N ms when the content changed; 0 = only when asked.
revisionHistorySnapshotBeforeRestoretrueFrom core 2.6.10: Restore first keeps the current content as a "Before restoring …" version, so a mistaken restore can be undone. false = the old behaviour, which discarded unsaved work.
revisionHistoryUrl""POST each version to this URL as JSON.
revisionHistoryRequestHeadersnullHeaders for that POST, as an object or a function returning one (e.g. an auth token).
onRevisionHistorySyncErrornull(detail) => called when a POST fails; the version is still kept locally.