
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI totally understand your situation! You want simple formatting in regular text fields without the complexity of full Portable Text blocks. Let me share some practical options:
The Short Answer: Yes, there are a few ways to add simple formatting to text fields, and you're on the right track with the markdown plugin!
Option 1: Use minimal Portable Text configuration
Instead of using the basic string type, you can use an array type with a stripped-down Portable Text configuration. This gives you a textarea-like field with just the formatting options you need:
{
name: 'simpleText',
type: 'array',
of: [{
type: 'block',
styles: [{title: 'Normal', value: 'normal'}],
lists: [],
marks: {
decorators: [
{title: 'Bold', value: 'strong'},
{title: 'Italic', value: 'em'}
],
annotations: [
{
name: 'link',
type: 'object',
title: 'Link',
fields: [{name: 'href', type: 'url'}]
}
]
}
}]
}This approach keeps you in the Portable Text ecosystem, so you can continue using block-content-to-react in Gatsby without additional parsing. You're just limiting which formatting options appear in the editor by customizing the styles, marks.decorators, and marks.annotations arrays.
Option 2: Markdown Plugin (Your Idea!)
The markdown plugin you found is definitely a solid choice! It's more user-friendly than raw markdown for many clients. You'd just need to add a markdown parser in your Gatsby frontend (like remark or marked) to convert it to HTML.
Option 3: Simple HTML in String Fields
Some folks allow basic HTML in string fields and sanitize it on the frontend, but this is generally not recommended as it's harder to validate and can be a security concern.
My Recommendation:
Go with Option 1 (minimal Portable Text config). Here's why:
string to the array configuration aboveblock-content-to-react setup in GatsbyYou can customize exactly which formatting options appear by adjusting what you include in the schema. Want to add headings? Add more items to the styles array. Need lists? Configure the lists array. This way, your clients get the simple formatting they need without the full complexity of your main body content blocks.
Hope this helps! đ
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