Sanity Portable Text vs. plain text fields: a content modeling decision
Decide when to use Sanity Portable Text instead of a plain string field for rich content, with schema, query, and rendering guidance.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Decide when to use Sanity Portable Text instead of a plain string field for rich content, with schema, query, and rendering guidance.
Portable Text is structured data, not HTML. Learn how to define custom annotations in the Sanity schema and build a shared serializer library so every frontend renders internal links, embeds, and custom marks consistently — without silent data loss.
Learn how to render Sanity Portable Text safely by aligning schema, GROQ projection, and a custom serializer to preserve links, annotations, and block semantics.
Learn how Sanity’s hotspot‑enabled image pipeline lets you shift cropping and responsive design decisions from code to content. A step‑by‑step guide covers schema setup, GROQ querying, and client‑side URL building, plus trade‑offs to watch out for.
Portable Text stores rich content as JSON blocks. Render it in React using block-content-to-react and custom serializers instead of raw HTML.
Portable Text stores rich content as JSON blocks. Rendering it correctly means writing serializers for marks and custom blocks, handling image asset references, and accepting payload trade-offs.
Define a Portable Text field in your Sanity schema, then render it safely in React with custom block serializers for text, marks, and images.
Decide between Sanity document references and Portable Text embeds for content relationships: a comparison table, trade-offs, schema code, and GROQ validation.
Portable Text lets you model rich content as typed blocks and transform it per channel with GROQ instead of rendering HTML everywhere. Use schema-defined custom blocks and serializer maps for portable, safe content.