Skip to content

Guides

Practical guides for customizing and extending the Portable Text Editor.

Change how the editor renders and styles text. Covers render props for blocks, spans, decorators, annotations, list items, placeholders, and range decorations.

Build custom toolbars using @portabletext/toolbar hooks. Covers decorator buttons, style selectors, keyboard shortcuts, undo/redo, and reflecting editor state.

Add custom behaviors to the editor. Walk through defining a behavior with events, guards, and actions, then registering it with BehaviorPlugin.

Common solutions using the Behavior API: logging, auto-closing brackets, emoji pickers, and raising events.