silverstripe / spellcheck
Improves spellcheck support for SilverStripe CMS, including an implementation for HunSpell.
Installs: 160 248
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 5
Forks: 9
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- php: ^7.4 || ^8.0
- silverstripe/framework: ^4.13
Requires (Dev)
- phpunit/phpunit: ^9.5
- silverstripe/versioned: ^1
- squizlabs/php_codesniffer: ^3.0
- 2.x-dev
- 2.5.x-dev
- 2.5.2
- 2.5.1
- 2.5.0
- 2.5.0-rc1
- 2.5.0-beta1
- 2.4.x-dev
- 2.4.0
- 2.4.0-rc1
- 2.4.0-beta1
- 2.3.x-dev
- 2.3.0
- 2.3.0-rc1
- 2.3.0-beta1
- 2.2.x-dev
- 2.2.1
- 2.2.0
- 2.2.0-rc1
- 2.2.0-beta1
- 2.1.x-dev
- 2.1.0
- 2.0.x-dev
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-beta1
- 1.1.x-dev
- 1.1.0
- 1.0.x-dev
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-master
This package is auto-updated.
Last update: 2024-10-11 23:30:00 UTC
README
NOTE: This module is no longer commercially supported in Silverstripe CMS 5 and it does not provide a CMS5-compatible version.
Improves spellcheck support for Silverstripe CMS, including an implementation for HunSpell.
Installation
Ensure that your server is setup with hunspell, and the necessary dictionaries for each language you wish to use.
Install the spellcheck module with composer, using composer require silverstripe/spellcheck ^2.0
, or downloading
the module and extracting to the 'spellcheck' directory under your project root.
Requirements
- Silverstripe 4.0.2 or above
- Hunspell
Note: this version is compatible with Silverstripe 4. For Silverstripe 3, please see the 1.x release line.
Configuration
Setup the locales you wish to check for using yaml. If you do not specify any, it will default to the current i18n default locale, and may not be appropriate if you have not configured dictionaries for some locales.
mysite/_config/config.yml
SilverStripe\SpellCheck\Handling\SpellController: locales: - en_NZ - fr_FR - de_DE
By default only users with the CMS_ACCESS_CMSMain
permission may perform spellchecking. This permisson
code can be altered (or at your own risk, removed) by configuring the SilverStripe\SpellCheck\Handling\SpellController.required_permission
config.
SilverStripe\SpellCheck\Handling\SpellController: # Restrict to admin only required_permission: 'ADMIN'
Extending
Additional spell check services can be added by implementing the SilverStripe\SpellCheck\Providers\SpellProvider
interface and setting this as
the default provider using yaml.
mysite/_config/config.yml
--- Name: myspellcheckprovider After: '#spellcheckprovider' --- # Set the default provider to HunSpell SilverStripe\Core\Injector\Injector: SilverStripe\SpellCheck\Data\SpellProvider class: MySpellProvider