
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI understand the frustration with the Tab key jumping to the publish button instead of indenting. This is a common issue in Sanity Studio's Portable Text editor because the Tab key is used for keyboard navigation between UI elements, which is important for accessibility.
The Tab key behavior you're experiencing is by design - it navigates through the Studio interface rather than indenting text. Unfortunately, the standard Portable Text editor doesn't have a straightforward Tab-to-indent feature like you might expect in a traditional text editor.
What you can try:
If you're working with lists, the Portable Text editor does support some automatic indentation behaviors, but the exact keyboard shortcuts aren't clearly documented in the official Sanity documentation. The editor may respond to certain key combinations at the beginning of list items, but this behavior can be inconsistent.
For code blocks specifically:
If you need to write code with proper indentation, I'd strongly recommend using the @sanity/code-input plugin. This provides a proper syntax-highlighted code editor where Tab works as you'd expect for indenting code. You can add it to your schema as a custom block type within your Portable Text field.
Markdown behaviors:
The Portable Text editor does have some automatic markdown-style behaviors that can be configured or disabled in your schema. However, the documentation doesn't specify exactly how Tab key indentation works (or if it's supported at all for regular text).
The reality:
The Tab key navigation is deeply tied to browser accessibility standards, and there isn't a simple toggle to make Tab indent text instead of navigating. This is a common trade-off in web-based content editors that need to balance editing convenience with keyboard navigation accessibility.
If indentation is critical for your content workflow, you might want to consider structuring your content differently - perhaps using nested block types or the code-input plugin for content that needs precise indentation control.
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