Portable Text Editor Monorepo

May 4, 2026 ยท View on GitHub

Portable Text Logo

Portable Text Editor Monorepo

Portable Text is an open specification for structured block content. Rich text, images, code blocks, and any custom type you define, stored as JSON and renderable anywhere.

This monorepo contains @portabletext/editor, the officially supported editor for working with Portable Text content. It's a headless, schema-driven block content editor for React: you bring the UI, the editor handles the editing. The other packages in this repository support editor work, including schema definition, toolbar hooks, plugins, conversion to and from HTML and Markdown, and testing utilities.

Looking to render Portable Text? The renderers (@portabletext/react, @portabletext/to-html, and friends) live in separate repositories. See Render Portable Text for the full picture.

For documentation and guides, visit portabletext.org. To try the editor, head to the Portable Text Playground.

Portable Text Playground

Core

PackageDescription
@portabletext/editorThe official editor for editing Portable Text
@portabletext/schemaDefine and compile Portable Text schemas with full type safety
@portabletext/toolbarReact hooks for building toolbars and related UI components

Editor Plugins

PackageDescription
@portabletext/plugin-character-pair-decoratorAutomatically match a pair of characters and decorate the text in between
@portabletext/plugin-emoji-pickerEasily configure an Emoji Picker for the Portable Text Editor
@portabletext/plugin-input-ruleEasily configure Input Rules in the Portable Text Editor
@portabletext/plugin-markdown-shortcutsAdds helpful Markdown shortcuts to the editor
@portabletext/plugin-one-lineRestricts the Portable Text Editor to a single line
@portabletext/plugin-paste-linkAllows pasting links in the Portable Text Editor
@portabletext/plugin-typeahead-pickerGeneric typeahead picker infrastructure (emoji, mentions, slash commands)
@portabletext/plugin-sdk-valueConnects a Portable Text Editor with a Sanity document using the SDK
@portabletext/plugin-typographyAutomatically transform text to typographic variants

Other Libraries

PackageDescription
@portabletext/htmlConvert HTML to Portable Text
@portabletext/block-toolsSanity-flavored HTML to Portable Text (wraps html)
@portabletext/markdownConvert Portable Text to Markdown and back again
@portabletext/keyboard-shortcutsPlatform-aware keyboard shortcuts
@portabletext/sanity-bridgeConvert between Sanity schemas and Portable Text schemas
@portabletext/patchesApply Sanity patches to a value
@portabletext/testTesting utilities for the Portable Text Editor
racejarA testing framework agnostic Gherkin driver