Go Behind the Experience to see how Tecovas brings the West to life with Sanity 🤠 July 18th

Spell check not working in Sanity studio, solution found

5 replies
Last updated: Feb 10, 2022
Hi, from what I see in the doc , the PTE should allow spell checking. But from what I have in my studio that's not the case.Spell check is working in
fields.I'm working with v.2.27 of Sanity.
Feb 9, 2022, 9:54 AM
Hi Sixclones. Possible nice find! I usually keep spell checking off in my browsers unless I need it. But as an FYI, I am able to recreate this. Chrome 98.0.4758.80, macOS 12.2. A similar portable text field and spelling error in studio v2.27 - and a comment field on a random public site for comparison. I can’t say for certain that browser spell check was happening in the studio prior to this.
Feb 9, 2022, 6:49 PM
I have reached out to the studio team with my own test results and will follow up. Thank you!
Feb 9, 2022, 7:42 PM
I checked spell checking in firefox and chrome. The team suggested this and it works for me.
in your portableText object, add

options: {
  spellCheck: true
Adding this explicit option appears to have done the trick for me! Here is portabletext object file in my tester for reference:

export default {
  title: 'Portable Text',
  name: 'ptext',
  type: 'array',
  of: [
      title: 'Block',
      type: 'block',
      options: {
        spellCheck: true
      styles: [
        {title: 'Normal', value: 'normal'},
        {title: 'H1', value: 'h1'},
        {title: 'H2', value: 'h2'},
        {title: 'H3', value: 'h3'},
        {title: 'H4', value: 'h4'},
        {title: 'Quote', value: 'blockquote'}
      lists: [{title: 'Bullet', value: 'bullet'}],
      marks: {
        decorators: [
          {title: 'Strong', value: 'strong'}, 
          {title: 'Emphasis', value: 'em'}],
            title: 'URL',
            name: 'link',
            type: 'object',
            fields: [{title: 'URL', name: 'href', type: 'url',}]
    /* adtnl types */
    {type: 'image', hotspot: true}

Feb 9, 2022, 9:09 PM
Ah I tried the
option but I misused it. Thanks for the answer! I confirm it's working on my side now. 🙂FYI the doc is saying that this option is
by default but it seems to not be the case.
Feb 10, 2022, 10:11 AM
This is secondhand info for me, so please don’t take it as official. But from what I understand the flag should be true for all browsers except chrome by default. Chrome apparently has been experiencing performance issues with spell checking, and this was disabled just for chrome. BUT from my own testing, the flag is apparently false for all browsers if left undefined.
They are discussing this now, and I’m sure either a noted behavior update will be made or the default flag will be set back soon, chrome performance willing. Thank you for finding this!
Feb 10, 2022, 4:57 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?