---
title: "Use spellcheck in Document Authoring"
canonical_url: "https://www.nutrient.io/guides/document-authoring/editing-and-review/spellcheck/"
md_url: "https://www.nutrient.io/guides/document-authoring/editing-and-review/spellcheck.md"
last_updated: "2026-06-08T17:11:05.445Z"
description: "Enable in-editor spellchecking in Document Authoring, choose an initial language, switch languages at runtime, and disable spellcheck when needed."
---

# Use spellcheck in Document Authoring

Before you start, ensure the Document Authoring library is installed and running. Refer to the [getting started](https://www.nutrient.io/sdk/document-authoring/getting-started.md) guide.

Document Authoring supports in-editor spellcheck for these languages:

- `en-US`

- `en-GB`

- `fr-FR`

- `de-DE`

Spellcheck is disabled by default. You can enable it when creating the editor or later at runtime.

The example code omits error handling. Add it before using this code in production.

## Enable spellcheck when creating the editor

Use [`UIOptions.spellcheck.language`](https://www.nutrient.io/api/document-authoring/types/uioptions/#spellcheck) to set the initial spellcheck language:

```js

const editor = await docAuthSystem.createEditor(
  document.getElementById('editor'),
  {
    ui: {
      spellcheck: { language: 'en-US' },
    },
  },
);

```

After the editor loads, spellcheck checks the document with the configured dictionary and underlines misspelled words.

## Enable or switch spellcheck at runtime

Use [`editor.enableSpellcheck(language)`](https://www.nutrient.io/api/document-authoring/types/docautheditor/#enablespellcheck) to turn spellcheck on or switch to a supported language:

```js

editor.enableSpellcheck('fr-FR');
editor.enableSpellcheck('de-DE');

```

`enableSpellcheck()` returns immediately. Misspelled words begin to be underlined shortly after the selected dictionary loads.

## Disable spellcheck

Use [`editor.disableSpellcheck()`](https://www.nutrient.io/api/document-authoring/types/docautheditor/#disablespellcheck) to turn spellcheck off:

```js

editor.disableSpellcheck();

```

Disabling spellcheck removes the current misspelled-word underlines and stops checking new edits.

## Build a spellcheck toggle

Connect spellcheck to your own controls so users can choose a language or turn it off:

```js

const editor = await docAuthSystem.createEditor(
  document.getElementById('editor'),
);

const languageSelect = document.getElementById('spellcheck-language');

languageSelect.addEventListener('change', (event) => {
  const value = event.target.value;

  if (value === 'off') {
    editor.disableSpellcheck();
    return;
  }

  editor.enableSpellcheck(value);
});

```

The corresponding HTML for the language selector could look like this:

```html

<select id="spellcheck-language">
  <option value="off">Off</option>
  <option value="en-US">English (US)</option>
  <option value="en-GB">English (UK)</option>
  <option value="fr-FR">French</option>
  <option value="de-DE">German</option>
</select>

```

## Spellcheck and self-hosted assets

If you use the default CDN-hosted SDK assets, nothing extra is required.

If you [self-host Document Authoring assets](https://www.nutrient.io/guides/document-authoring/self-hosting-assets.md), make sure the spellcheck dictionary assets are hosted under the same asset base path as the rest of the SDK assets. Spellcheck loads dictionary files from these paths:

- `spellcheck/en-US.dat`

- `spellcheck/en-GB.dat`

- `spellcheck/fr-FR.dat`

- `spellcheck/de-DE.dat`

If these files are missing from your self-hosted asset bundle, spellcheck won’t load for those languages.

## Learn more

- [Document Authoring API reference](https://www.nutrient.io/api/document-authoring/)

- [Self-hosting assets](https://www.nutrient.io/guides/document-authoring/self-hosting-assets.md)
---

## Related pages

- [Review documents with comments](/guides/document-authoring/editing-and-review/comments-and-review-workflows.md)
- [Use tracked changes and editor modes](/guides/document-authoring/editing-and-review/tracked-changes-and-editor-modes.md)

