Important changes to Tiny Cloud pricing > Find out more

Spell Checker Pro plugin

Check spelling as-you-type in TinyMCE.

Contribute to this page

Note: This plugin is only available for paid TinyMCE subscriptions.

Spell Checker Pro adds spell checking as-you-type capabilities to TinyMCE. For information on the supported languages, refer to this section.

Cloud Installation

To enable the TinyMCE Enterprise Spellchecking plugin with Tiny Cloud:

  1. If configured, disable the spellchecker plugin provided with TinyMCE, by removing it from the plugins list.
  2. Add tinymcespellchecker to the plugins list.

With Tiny Cloud the server-side spellchecking component is automatically configured, so the spellchecker_rpc_url parameter does not need to be set.

Example: TinyMCE Cloud Installation

tinymce.init({
	selector: 'textarea',
	plugins: 'tinymcespellchecker',
	spellchecker_language: 'en'
});

Self-hosted Installation

To enable the TinyMCE Enterprise Spellchecking plugin:

  1. If configured, disable the spellchecker plugin provided with TinyMCE, by removing it from the plugins list.
  2. Add tinymcespellchecker to the plugins list.

For information on installing the server-side component for spell checking, please see the server-side component installation guide.

Example: TinyMCE Self-hosted Installation

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  spellchecker_rpc_url: 'localhost/ephox-spelling',
  spellchecker_language: 'en'
});

Usage

The TinyMCE Enterprise Spellchecking plugin activates automatically when users type content into the editor. To select a spelling suggestion for a misspelled word, right-click the misspelled word to open the contextual menu.

Configuration Options

spellchecker_active

This option enables or disables the spell checker when the editor is loaded. When set to false, the spellchecker will not be active when the editor is initialized. The toolbar button or the menu item will have to be selected by the user to start the spell checker.

Type: Boolean

Default Value: true

Possible Values: true, false

Example: spellchecker_active

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  spellchecker_active: true
});

spellchecker_dialog

This option specifies the primary spell checking mode.

Type: Boolean

Default Value: false

Possible Values: true, false

Example: spellchecker_dialog

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  toolbar: 'spellchecker',
  spellchecker_dialog: true
});

spellchecker_language

This option specifies the default language used by Spell Checker Pro.

Type: String

Default Value: 'en_us'

Example: spellchecker_language

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  spellchecker_language: 'en_us'
});

Supported languages

The following languages are supported:

Language Code
English (US) en, en-US
English (UK) en_uk, en_gb, en_br
English (US) - with additional medical terms en-US-medical
English (UK) - with additional medical terms en-GB-medical
Danish da
Dutch nl
Finnish fi
French fr
German de
Italian it
Norwegian nb
Portuguese (Brazil) pt
Portuguese (Europe) pt_PT
Spanish es
Swedish sv

spellchecker_languages

This option specifies the spellchecker languages that are available to the user, provided as a comma delimited string. For a list of available languages, see: Supported languages.

Type: comma-separated String

Default Value:

'US English=en_us,UK English=en_gb,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Norwegian=nb,Brazilian Portuguese=pt,Iberian Portuguese=pt_PT,Spanish=es,Swedish=sv'

Example: spellchecker_languages

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  spellchecker_languages: 'US English=en_us,UK English=en_gb,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Norwegian=nb,Brazilian Portuguese=pt,Iberian Portuguese=pt_PT,Spanish=es,Swedish=sv'
});

spellchecker_on_load

Note: Removed in Spell Checker Pro 2.0 (TinyMCE 5.2). Spell Checker Pro will now always run on editor initialization. To disable Spell Checker Pro on load, use spellchecker_active.

This option runs the spellchecker when the contents of the editor is loaded.

Type: Boolean

Default Value: false

Possible Values: true, false

Example: spellchecker_on_load

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  spellchecker_on_load: true
});

spellchecker_rpc_url

This option specifies the URL of the server-side ephox-spelling service. For instructions on how to set up a Spell Checker Pro server-side component, see: the server-side component installation guide.

Note: spellchecker_rpc_url is not required when enabling this plugin via Tiny Cloud

Type: String

Example: spellchecker_rpc_url

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  spellchecker_rpc_url: 'localhost/ephox-spelling'
});

spellchecker_select_languages

This option specifies the languages that can be set for content when working with multi-language content. The specified languages will be available from the language toolbar drop-down menu button. For a list of available languages, see: Supported languages.

Type: comma-separated String

Default Value: 'en,es,fr,de,pt,zh'

Example: spellchecker_select_languages

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  toolbar: 'language',
  spellchecker_select_languages: 'en,es,fi,fr,da,de,nl,it,nb,pt,sv,zh'
});

spellchecker_whitelist

This option specifies an array of words to be ignored by the spell checker.

Type: String[]

Example: spellchecker_whitelist

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  spellchecker_whitelist: ['tinymce','TinyMCE']
});

Toolbar buttons

The Spell Checker Pro plugin provides the following toolbar buttons:

Toolbar button identifier Description
language Sets the spellchecker language for the current selection.
spellcheckdialog Opens the spelling checker dialog if spellchecker_dialog is false, otherwise this button is disabled.
spellchecker Opens the spelling checker dialog if spellchecker_dialog is true, otherwise this button enables or disables spell checking as-you-type.

These toolbar buttons can be added to the editor using:

Menu items

The Spell Checker Pro plugin provides the following menu items:

Menu item identifier Default Menu Location Description
spellchecker Tools Toggles the spellchecker on/off.
spellcheckerlanguage Tools Changes the language used for the spell checking process for the document or the currently selected text.

These menu items can be added to the editor using:

Events

The following events are provided by the Spell Checker Pro plugin.

Name Data Description
SpellcheckerIgnore { word: string } Fired when a single instance of a word has been marked as ignored.
SpellcheckerIgnoreAll { word: string } Fired when all instances of a word has been marked as ignored.
SpellcheckError { message: string } Fired when a spellchecker error occurs, such as the Spell Checker Pro service can’t be reached.
SpellcheckStart N/A Fired when spellchecking is enabled.
SpellcheckEnd N/A Fired when spellchecking is disabled.

SpellcheckerIgnore event

This event triggers when the user selects Ignore on a misspelled word.

Example: The SpellcheckerIgnore event

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  toolbar: 'spellchecker',
  init_instance_callback: function (editor) {
    editor.on('SpellcheckerIgnore', function (e) {
      console.log('Ignore word', e.word);
    });
  }
});

SpellcheckerIgnoreAll event

This event triggers when the user selects Ignore All on a misspelled word.

Example: The SpellcheckerIgnoreAll event

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  toolbar: 'spellchecker',
  init_instance_callback: function (editor) {
    editor.on('SpellcheckerIgnoreAll', function (e) {
      console.log('Ignore word (all)', e.word);
    });
  }
});

SpellcheckStart event

This event triggers when the user enables the spellchecker.

Example: The SpellcheckStart event

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  toolbar: 'spellchecker',
  init_instance_callback: function (editor) {
    editor.on('SpellcheckStart', function (e) {
      console.log('Started spellchecking');
    });
  }
});

SpellcheckEnd event

This event triggers when the user disables the spellchecker.

Example: The SpellcheckEnd event

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  toolbar: 'spellchecker',
  init_instance_callback: function (editor) {
    editor.on('SpellcheckEnd', function (e) {
      console.log('Stopped spellchecking');
    });
  }
});

SpellcheckError event

This event triggers when a spellchecker error occurs, such as the Spell Checker Pro service can’t be reached.

Example: The SpellcheckError event

tinymce.init({
  selector: 'textarea',
  plugins: 'tinymcespellchecker',
  toolbar: 'spellchecker',
  init_instance_callback: function (editor) {
    editor.on('SpellcheckError', function (e) {
      console.log('Spelling service error: ' + e.message);
    });
  }
});

Can't find what you're looking for? Let us know.

Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.