Enable Firefox spellchecking for CKEditor und TinyMCE in wysiwyg module

Estimated reading time of this article: 0 minutes 30 seconds

You want to reenable Firefox spellchecking for CKEditor und TinyMCE with wysiwyg module in Drupal 7?

Then put the following code in a module:

<?php
/**
 * Enables Firefox spellchecking for CKEditor and TinyMCE.
 * Implementation of hook_wysiwyg_editor_settings_alter().
 */
function YOUR_MODULE_wysiwyg_editor_settings_alter(&$settings, $context) {
 
// http://drupal.org/node/977390 and http://drupal.org/node/764100
 
if($context['profile'] -> editor == 'ckeditor') {
   
$settings['disableNativeSpellChecker'] = FALSE;
   
$settings['browserContextMenuOnCtrl'] = TRUE;
  }
 
// http://drupal.org/node/627180
 
elseif($context['profile'] -> editor == 'tinymce') {
   
$settings['gecko_spellcheck'] = TRUE;
  }
}
?>