# Rich text editor

A lightweight editor with markdown shortcuts, a floating toolbar, a slash menu, and HTML and markdown output.

- ID: `rich-text-editor`
- Import: `animui/rich-text-editor`
- Category: Inputs
- Runtime exports: `RichTextEditor`, `default`, `htmlToMarkdown`, `markdownToHtml`, `normalizeUrl`, `sanitizeHtml`
- Declaration: `types/free/components/rich-text-editor.d.ts`
- Type provenance: emitted-original-typescript
- Related: textarea, mention-input, code-block, inline-edit

```tsx
import { RichTextEditor } from 'animui/rich-text-editor';
```

This import example is not a complete render recipe: read the declaration below and its local references for required props, data, callbacks and provider context. Use `animui info rich-text-editor` to resolve the local declaration graph. Global setup is in `llms.txt`.

```ts
export { RichTextEditor, default, htmlToMarkdown, markdownToHtml, normalizeUrl, sanitizeHtml } from '../registry/components/rich-text-editor/rich-text-editor.js';
export type { BlockType, RichTextEditorHandle, RichTextEditorProps, RichTextValue } from '../registry/components/rich-text-editor/rich-text-editor.js';
```
