Smart typography in the Portable Text Editor, and minor bugfixes

Published: December 15, 2025

v4.22.0
Sanity Studio

Smart typography in the Portable Text Editor

Sanity Studio’s Portable Text Editor includes the @portabletext/plugin-typography plugin. This transforms common characters into their nicer equivalents: double hyphens(--) into em dashes (—), "straight quotes" becomes “smart quotes,” and more. You can enable smart typography globally by enabling it in sanity.config.ts, or field-by-field basis.

For the full list of behaviors and configuration options, go to the Portable Text Editor for Sanity Studio documentation.

Notable bugfixes

  • Fixes unique key errors when deleting and reverting objects in the middle of an array.
  • Fixes resolution of @sanity/vision in pnpm projects with enableGlobalVirtualStore set to true (thanks RJWadley for the fix!)
  • Fixes toolbar style selection states (like strikethrough) not displaying when the Portable Text Toolbar is collapsed into a dropdown menu
  • Fixes backward text selection breaking across blocks in fullscreen Portable Text inputs
  • sanity no longer show a warning if deployment.appId is missing from sanity.cli.ts
  • Fixes --replace and --missing flags for sanity dataset import to correctly handle release system documents. Previously, these flags only affected regular documents, causing “there is already a release with that ID” errors even when --replace was specified.
  • Restores the delete document action to draft documents. This action deletes all versions of the document, including published and draft.
  • Fixes an issue where studios with no plugins incorrectly redirecting to the content releases or scheduled drafts screens.
  • Fixes studios embedded in Next.js throwing errors like this: