Content & CMS

Portable Text

Portable Text: structured rich text that renders anywhere.

What it is

Portable Text is an open standard, built by Sanity, for storing rich text as structured JSON rather than HTML. The same paragraph renders as semantic HTML on a website, plain text in an email digest, or native components in a mobile app — with embedded blocks like CTAs, image galleries and product cards treated as first-class, reusable data. It separates what the content says from how any one channel chooses to present it.

Why we build with it
  • 01Content and presentation stay separate, so you can redesign the site without re-editing or re-migrating a single article.
  • 02Output is semantic and accessible by default — real headings, lists and links, not styled divs.
  • 03Custom blocks (quotes, CTAs, embeds, galleries) are structured and reusable across every page and channel.
  • 04It is an open, well-documented spec with battle-tested renderers for React, Vue, Swift, Kotlin and more.
  • 05The same content powers your website, app and feeds from one source of truth — no copy-paste, no drift.

Most content management still treats rich text as a blob of HTML — and that decision quietly haunts teams in Dubai and across the UAE for years. The moment you redesign, rebrand or launch an app, that HTML fights you: inline styles, orphaned tags and presentation rules baked into the words themselves. Portable Text takes a different path. It stores rich content as structured, editable data, so what the content says stays cleanly separate from how any one screen chooses to show it.

What Portable Text actually is

Portable Text is an open specification, created by the team behind Sanity, for representing rich text as structured JSON. Instead of a string of markup, your content becomes an array of blocks: paragraphs, headings, lists, and custom objects such as call-to-action banners, image galleries or product cards. Each block carries its meaning, not its appearance — and a renderer decides, per channel, how that meaning should look.

Why Karve builds content on Portable Text

Redesign without re-migrating

Because presentation lives in the renderer, not the content, a full rebrand or website rebuild never means re-editing your articles. We change the components; every existing page picks up the new design automatically. That is the difference between a redesign that takes weeks and one that drags on for a quarter of content clean-up.

One source, every channel

The same content can render as semantic HTML on the website, as native components inside a React Native app, and as clean plain text in an email digest. You write once; each channel maps the structure to its own presentation. No copy-paste, no parallel CMS, no slow drift between platforms.

Structured, queryable and safe

Because it is data, content is queryable with GROQ, validated against a schema, and free of the broken-markup, inline-style and XSS problems that come from pasting HTML. You can pull every CTA across the site, count embeds, or restructure content programmatically — things that are impossible with an HTML blob.

Where it fits in a Karve build

Portable Text underpins the editorial layer of nearly every site we ship on Sanity. On the Trivandi build it let a global events consultancy publish structured, on-brand pages in both English and Arabic from a single content model — long-form copy and custom blocks side by side, with no developer in the loop for everyday edits.

What we deliver

  • Custom block schemas modelled around how your editors actually write

  • Renderers for web, native apps and feeds from one content source

  • Bilingual Arabic-English content with correct RTL handling

  • Migration of legacy HTML and WYSIWYG content into clean, structured data

Weighing structured content as part of a wider platform decision? Our take on headless CMS versus a monolith digs into why the way you store content shapes everything from performance to SEO.

/01

What it does

Custom block schemas

We model bespoke editorial blocks — pull quotes, CTAs, comparison tables, embeds, galleries — so editors compose rich pages without touching code or breaking layout.

Multi-channel rendering

One content source renders to semantic HTML on the web, native views in React Native apps, and clean text in feeds — each channel mapped to its own components.

Bilingual Arabic-English content

Structured content makes RTL Arabic and LTR English first-class side by side — marks, links and embeds carry across both languages with correct direction for GCC audiences.

Safe, queryable content

Because it is data, not markup, content is queryable with GROQ, validated against a schema, and immune to the broken-markup and XSS pitfalls of pasted HTML.

Migration & portability

We migrate legacy HTML and WYSIWYG content into clean Portable Text, so your archive becomes structured, reusable data you can carry to any future platform.

/02

About Portable Text

What is wrong with normal HTML rich text?

HTML-based rich text bakes formatting and layout decisions into the content itself, so a redesign or a new channel forces you to re-edit or migrate everything. It is also prone to broken markup, inline styles and security risks when content is pasted from elsewhere. Portable Text keeps content as clean, structured data, so presentation can change freely while the words stay untouched.

When should we use Portable Text instead of a simple text field?

Reach for Portable Text whenever content is genuinely rich — articles, case studies, product pages — or whenever the same content must appear on more than one channel, such as a website and a mobile app. A plain string is fine for a label or a headline, but the moment editors need headings, links, embeds or reusable blocks, structured content saves you from a far more painful rebuild later. If you are unsure, we will model it during the discovery phase of your web build.

Does Portable Text only work with Sanity?

No. Portable Text is an open specification, and while it originated with Sanity it is just JSON, so it can be stored, queried and rendered anywhere. There are well-maintained renderers for React, Vue, Svelte, Swift and Kotlin, which is exactly why your content stays portable even if your platform changes one day. In practice we pair it with Sanity because the editing experience and the structured model fit together so cleanly.

Can the same content render in both a website and a mobile app?

Yes — that is one of the strongest reasons to use it. Because the content is structured data rather than HTML, the web renders it as semantic markup while a React Native app maps the same blocks to native components, all from one source of truth. You write and edit once, and both channels stay in sync. We use exactly this pattern when a web project and a mobile app share the same content backend.

How does it handle bilingual Arabic and English content?

Very well. Each language is stored as its own structured value on the same document, so Arabic RTL and English LTR content live side by side with their own marks, links and embedded blocks intact. The renderer applies the correct text direction per locale automatically, which matters for GCC audiences who expect a properly mirrored Arabic experience. This is the same approach we use across the bilingual sites we build for the UAE market.

Can you migrate our existing HTML content into Portable Text?

Yes. We write migration scripts that parse legacy HTML or WYSIWYG output and convert it into clean, validated Portable Text, mapping recurring patterns to your custom blocks rather than dumping raw markup. Timelines depend on volume and how consistent the source is — a few hundred tidy articles can move in days, while a large, messy archive needs a mapping and review pass. Either way the result is structured, reusable content you can carry to any future platform.

Where Portable Text fits

Web Development in Dubai

Web development in Dubai built on Next.js, Sanity and Laravel — fast, SEO-optimised, mobile-first websites and headless ecommerce engineered to convert across the UAE.

The service

Building with Portable Text?
So are we.

Let's Talk