
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI understand you want to let users on your website enter rich text content with formatting (bold, code snippets, etc.) that gets saved to Sanity, rather than just using the editor inside Sanity Studio.
Unfortunately, there isn't an official standalone Portable Text Editor component from Sanity that you can easily drop into your front-end application for end users. The Portable Text Editor is tightly integrated with Sanity Studio and isn't designed to be used independently in external forms.
However, you have several approaches to solve this:
You can embed Sanity Studio directly into your website. This gives you the full Studio experience, including the Portable Text Editor, within your own application. This works well if you want users to have a content editing interface.
Since there's no standalone Portable Text Editor, many developers use popular rich text editors and convert their output to Portable Text format:
Popular options:
The challenge is you'll need to write conversion logic between the editor's format and Portable Text's JSON structure. There isn't an official Sanity-maintained converter for these editors, though community members have built some solutions.
You could use a simpler approach with libraries like:
The Portable Text specification is well-documented, so you can construct the JSON structure programmatically.
If you only need basic formatting (bold, italic, code), you could:
The lack of a standalone Portable Text Editor is a known limitation. The editor is deeply integrated with Studio's form system, real-time collaboration features, and validation. Extracting it for standalone use isn't straightforward.
Most production apps either:
If you're building a commenting system, blog submission form, or similar feature, you might want to consider whether you truly need the full power of Portable Text, or if a simpler rich text solution (even just markdown) might be more practical for your use case.
There's a Standalone Portable Text Editor playground you can explore to see how the editor works, but this is more for demonstration purposes rather than a production-ready component you can install via npm.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store