> For the complete documentation index, see [llms.txt](/llms.txt).
> The full corpus is at [llms-full.txt](/llms-full.txt).

# Reference

> API reference for the Portable Text Editor and its packages.

Reference documentation for the editor's APIs, plugins, and tools.

### [Editor API](/editor/reference/editor/)

The `useEditor` and `useEditorSelector` hooks for interacting with the editor programmatically.

### [Behavior API](/editor/reference/behavior-api/)

Complete reference for `defineBehavior`: all native, synthetic, and custom event types, guard patterns, and action types (`execute`, `forward`, `raise`, `effect`).

### [Selectors](/editor/reference/selectors/)

Pure functions for deriving state from the editor snapshot. Includes block selectors, span selectors, selection state, active marks, and text position utilities.

### [Keyboard shortcuts](/editor/reference/keyboard-shortcuts/)

The `@portabletext/keyboard-shortcuts` package. Platform-aware shortcuts for common formatting operations.

### [Plugins](/editor/reference/plugins/)

Available editor plugins: markdown shortcuts, emoji picker, input rules, character pair decorators, paste link, one-line mode, typeahead picker, and typography transforms.

### [Toolbar](/editor/reference/toolbar/)

The `@portabletext/toolbar` package. React hooks for building toolbar UI components.