Keyboard shortcuts for rich text editor (e.g., cmd+option+2 for H2)
Great news! Sanity recently added markdown-style keyboard shortcuts to the Portable Text Editor. According to the changelog from January 2025, the editor now ships with markdown keyboard shortcuts for headings, block quotes, and lists.
However, these shortcuts work differently from the traditional CMD+Option+2 style you're used to in Google Docs or Contentful. Instead, they use markdown-style shortcuts:
- Type
##followed by a space to create an H2 heading - Type
###followed by a space for H3, and so on - Type
>followed by a space for block quotes - Type
-or*followed by a space for bullet lists - Type
1.followed by a space for numbered lists
This markdown approach is becoming increasingly common in modern editors and can be quite efficient once you get used to it. The shortcuts trigger automatically when you type the pattern and hit space.
If you need the traditional keyboard shortcuts (like CMD+Option+2), that's not currently a built-in feature, but you could potentially build a custom plugin to add those shortcuts. The Portable Text Editor is highly configurable, and you can extend it with custom behaviors.
The markdown shortcuts should be available in recent versions of Sanity Studio, so make sure you're running an up-to-date version to access this feature. If you're not seeing them work, try updating your Studio dependencies.
Show original thread4 replies
Sanity – Build the way you think, not the way your CMS thinks
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.