Convert HTML and Markdown content into Portable Text blocks for Sanity. Use when migrating content from legacy CMSs, importing HTML or Markdown into Sanity,…
Portable Text Conversion Convert external content (HTML, Markdown) into Portable Text for Sanity. Three main approaches: markdownToPortableText — Convert Markdown directly using @portabletext/markdown (recommended for Markdown) htmlToBlocks — Parse HTML into PT blocks using @portabletext/block-tools (for HTML migration) Manual construction — Build PT blocks directly from any source (APIs, databases, etc.) Portable Text Specification Understand the target format before converting. PT is an array of blocks:
don't have the plugin yet? install it then click "run inline in claude" again.