AI AGENT ADDONS

Portable Text Conversion

sanity-io/agent-toolkit
Backend & APIs
1,306installs

Portable Text is a special format used by Sanity for rich text content. This tool helps you turn HTML and Markdown into Portable Text blocks. It is useful when moving content from old websites or writing programs that create Sanity documents.

The tool includes two main libraries. markdownToPortableText converts Markdown directly. htmlToBlocks parses HTML into blocks. You can also build blocks manually from any source like APIs or databases.

Every block and span needs a unique key called _key. Text blocks use _type: "block" while images and other custom types use their own type. Lists use listItem and level to show bullets or numbers.

Add Portable Text Conversion skill to your workflow

Global

mkdir -p ~/.claude/skills/portable-text-conversion

Project

mkdir -p .claude/skills/portable-text-conversion

Source Repository

Stars
159
Forks
22
Watchers
159
License
MIT
Last Push
1 month ago
Created
1 year ago