Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tractorcow/silverstripe-spellcheck
Spellcheck for SilverStripe
https://github.com/tractorcow/silverstripe-spellcheck
Last synced: about 1 month ago
JSON representation
Spellcheck for SilverStripe
- Host: GitHub
- URL: https://github.com/tractorcow/silverstripe-spellcheck
- Owner: tractorcow
- License: other
- Created: 2014-07-22T05:57:39.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-02T01:48:00.000Z (about 9 years ago)
- Last Synced: 2024-10-16T16:49:48.112Z (3 months ago)
- Language: PHP
- Size: 177 KB
- Stars: 3
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Spellcheck for SilverStripe
Improves spellcheck support for SilverStripe CMS, including an implementation for HunSpell.
## Installation
Ensure that your server is setup with [hunspell](http://hunspell.sourceforge.net/), and the necessary
[dictionaries](http://download.services.openoffice.org/files/contrib/dictionaries/) for each language you wish to use.Install the spellcheck module with composer, using `composer require silverstripe/spellcheck:*`, or downloading
the module and extracting to the 'spellcheck' directory under your project root.## 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
```yaml
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 `SpellController.required_permission` config.```yaml
SpellController:
# Restrict to admin only
required_permission: 'ADMIN'
```## Extending
Additional spell check services can be added by implementing the `SpellProvider` interface and setting this as
the default provider using yaml.mysite/_config/config.yml
```yaml
---
Name: myspellcheckprovider
After: '#spellcheckprovider'
---
# Set the default provider to HunSpell
Injector:
SpellProvider: MySpellProvider
```