Rich Text Editor

A WYSIWYG editor that shows formatting as you write and saves HTML, plus Rich Text Content to show what was written.
Experimental
Web
iOS
Android
@advui/editor
Source

In a form field

Select text, then pick a format from the toolbar.

Installation

pnpm
pnpm add @advui/editor
npm
npm install @advui/editor

Usage

import { RichTextContent, RichTextEditor } from '@advui/editor'

<RichTextEditor aria-label="Report" value={html} onValueChange={setHtml} />

// Show saved text:
<RichTextContent>{html}</RichTextContent>

Examples

Fewer tools, for comments

Showing saved text

Distribution plan
Register households with the village tract leader
Hand out hygiene kits at the monastery
Record every distribution in the 5W form
Keep paper lists digital records only.

API reference

RichTextEditor

PropTypeDefaultDescription
valuestring—The text, as HTML. An empty document is an empty string.
defaultValuestring—Starting `value` when uncontrolled.
onValueChange(value: string) => void—Called with the new `value` as the text changes.
placeholderstring—Shown while empty.
toolsRichTextTool[]all tenToolbar buttons, in order: 'bold', 'italic', 'underline', 'strikethrough', 'heading', 'bulletList', 'orderedList', 'quote', 'link', 'code'.
minHeightnumber | SizeTokens'32'Height of the text before it grows.
invalidboolean—Error styling and `aria-invalid`.
disabledboolean—Not editable; the tools are disabled.
aria-labelstring—Names the editor when there is no visible label. A Field sets it for you.
idstring—The text’s id. A Field sets it, and names the text with its label.
aria-describedbystring—Ids of help or error text. A Field sets it for you.
labelsPartial<RichTextEditorLabels>—Toolbar, tool and link field text, for translation.

RichTextContent

Shows the HTML with the same styles as Markdown Content. Also takes View props.
PropTypeDefaultDescription
children requiredstring—The HTML.
headingOffsetnumber0Added to heading levels, for text shown under a deeper heading.

Accessibility

  • The text is a multi-line textbox, named by aria-label or a Field’s label (aria-labelledby on web).
  • The toolbar is a WAI-ARIA toolbar with one tab stop; each tool is a toggle button that shows whether the selection has it (aria-pressed on web, a checked toggle button on iOS and Android), with its shortcut in aria-keyshortcuts and the tooltip.
  • After a tool is used, focus returns to the text. Link opens an address field under the toolbar; Enter applies it and Escape returns to the text.
  • Tab leaves the text, also in lists: lists are not nested with Tab, so the keyboard never stays trapped.
  • Rich Text Content draws the HTML as views with real headings and lists; scripts and styles in it never run, and links only follow http(s) and mailto addresses.
Keyboard interactions
KeyAction
⌘ / Ctrl + B, I, UBold, italic, underline.
⌘ / Ctrl + Shift + SStrikethrough.
⌘ / Ctrl + ECode.
⌘ / Ctrl + KLink: opens the address field.
⌘ / Ctrl + Alt + 2Heading.
⌘ / Ctrl + Shift + 8, 7Bulleted, numbered list.
⌘ / Ctrl + Shift + BQuote.
⌘ / Ctrl + Z, Shift + ZUndo, redo.
TabToolbar, then the text.
Arrow keysMove between tools in the toolbar.

Responsive behavior

The toolbar wraps on narrow screens.

Platform notes

Web
TipTap edits the text in the page. Typing Markdown shortcuts (## , - , **bold**) formats as you go. The value is HTML: show it with Rich Text Content, not as markup.
iOS
TipTap runs in a WebView (TenTap, with react-native-webview, which Expo Go includes), under the same toolbar; the WebView grows with the text. App fonts are not loaded in it, so it uses the system font. Not yet checked on a device.
Android
Same as iOS. Not yet checked on a device.
Since v0.14.0Last updated Nov 2, 2026Edit this page on GitHub