Closed (fixed)
Project:
Wysiwyg
Version:
6.x-2.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2010 at 17:44 UTC
Updated:
9 Sep 2016 at 14:52 UTC
Jump to comment: Most recent
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
Comment #1
twodIf 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().
Comment #2
eugenmayer commentedYou 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?
Comment #3
Jay Adan commentedThanks 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.
Comment #4
twodNo 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.
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.
Comment #6
spelcheck commentedUsing 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
Comment #7
weekev commentedFor 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...
- scayt_autoStart
+ scayt_autoStartup
Comment #8
Sarenc commentedThanks everyone!
I had errors because $context wasn't being passed by reference so I dropped the & and everything was good.
Comment #9
mchar commentedI can confirm that this is the case, as described in comment#7, for wysiwyg version:
7.x-2.2as well.Comment #10
twodFixed another typo in #4. It didn't really change anything, but
$contextisn't intended to be used by reference.