Spell Check As You Type is pretty cool but I would love it if it could be on all the time rather than having to select it each time I go to edit content. Is there a way to make that happen?

Comments

twod’s picture

Status: Active » Fixed

If you're using the latest version of CKEditor, it should be enabled by default. We can't actually turn it off yet, even if the spell checking buttons aren't selected, due to #817894: Support removePlugins setting to allow disabling CKEditor plugins.
Also see scayt_autoStartup setting for CKEditor. This is possible to override using an implementation of hook_wysiwyg_editor_settings_alter().

eugenmayer’s picture

You can disable the scayt spellchecker and activate the browser internal ones like the one of Firefox using settings override.

I would not implement those hooks in WYSIWYG, but i think a good default would be very good for the reputation and spreading of WYSIWYG. Maybe it should be a submodule providing such defaults for each editor?

Jay Adan’s picture

Thanks for the help.

I found the information about changing the settings for the config file to be helpful. I'm sure that I would have no problem adjusting that file to make it do what I would like it to do... but I can't seem to locate it. It says that this option would be found in plugins/scayt/plugin.js... but I don't see plugin.js inside of plugins/scayt. Should I expect to see that there or am I perhaps required to create it if it doesn't already exist? My js-fu is a little weak.

twod’s picture

Component: Code » Editor - CKeditor
Status: Closed (fixed) » Fixed

No need to change any config files when running under Wysiwyg. You can make Wysiwyg override the settings it sends to the editor without modifying any files in the CKEditor library or the module itself.

Create a new small modue (or reuse an existing custom one) and add this code to it. When enabled, it will override the scayt_autoStart setting for all editor instances.

function MYMODULE_wysiwyg_editor_settings_alter(&$settings, $context) {
  if($context['profile']->editor == 'ckeditor') {
    $settings['scayt_autoStartup'] = TRUE;
  }
}

EDIT: Fixed typo, thanks weekev!

If you're using the latest CKEditor version, this setting will already be TRUE by default so the above code won't make any difference. But if you're running an earler CKEditor version, it'll turn SCAYT on when the editor starts. (Note that the user can't toggle it themselves unless you also enable the SCAYT button under "Buttons and Plugins" on the profile settings.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

spelcheck’s picture

Component: Editor - CKeditor » Code

Using CKEditor through Wysiwyg I was having no luck getting this custom module workaround working, then I went into admin/settings/wysiwyg and deleted the CKeditor profile I'd assigned, re-added it and re-enabled SCAYT and SC in the buttons prefs. The custom module now works like a switch. Thanks everybody for posting-

elizzle

weekev’s picture

For the record I was banging my head against a wall using the above code snippet in #4
When I discovered what appears to be a typo.

It should be...

<?php
function MYMODULE_wysiwyg_editor_settings_alter(&$settings, &$context) {
  if($context['profile']->editor == 'ckeditor') {
    $settings['scayt_autoStartup'] = TRUE;
  }
}
?>

- scayt_autoStart
+ scayt_autoStartup

Sarenc’s picture

Component: Editor - CKeditor » Code
Status: Fixed » Closed (fixed)

Thanks everyone!

I had errors because $context wasn't being passed by reference so I dropped the & and everything was good.

mchar’s picture

Issue summary: View changes

I can confirm that this is the case, as described in comment#7, for wysiwyg version: 7.x-2.2 as well.

twod’s picture

Fixed another typo in #4. It didn't really change anything, but $context isn't intended to be used by reference.