mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #7443 from open-sausages/pulls/4/remove-php-spellchecker
Remove TinyMCE spellchecker instructions
This commit is contained in:
commit
13b4722aaf
@ -330,34 +330,4 @@ mainly around selecting and inserting content into the editor view.
|
||||
Have a look in `HtmlEditorField.js` and the `ss.editorWrapper` object to get you started
|
||||
on your own editor wrapper. Note that the [HtmlEditorConfig](api:SilverStripe\Forms\HTMLEditor\HtmlEditorConfig) is currently hardwired to support TinyMCE,
|
||||
so its up to you to either convert existing configuration as applicable,
|
||||
or start your own configuration.
|
||||
|
||||
### Integrating a Spellchecker for TinyMCE
|
||||
|
||||
The TinyMCE editor uses spellchecking integrated into the browser if possible
|
||||
([docs](http://www.tinymce.com/wiki.php/Plugin3x:spellchecker)).
|
||||
Most modern browsers support it, although Internet Explorer only has limited
|
||||
support in IE10. Alternatively, you can use the PSpell PHP module for server side checks.
|
||||
Assuming you have the module installed, here's how you enable its use in `mysite/_config.php`:
|
||||
|
||||
|
||||
```php
|
||||
HtmlEditorConfig::get('cms')->enablePlugins('spellchecker', 'contextmenu');
|
||||
HtmlEditorConfig::get('cms')->addButtonsToLine(2, 'spellchecker');
|
||||
HtmlEditorConfig::get('cms')->setOption(
|
||||
'spellchecker_rpc_url',
|
||||
THIRDPARTY_DIR . '/tinymce-spellchecker/rpc.php'
|
||||
);
|
||||
HtmlEditorConfig::get('cms')->setOption('browser_spellcheck', false);
|
||||
```
|
||||
|
||||
Now change the default spellchecker in `framework/thirdparty/tinymce-spellchecker/config.php`:
|
||||
|
||||
|
||||
```php
|
||||
|
||||
// ...
|
||||
$config['general.engine'] = 'PSpell';
|
||||
```
|
||||
|
||||
|
||||
or start your own configuration.
|
Loading…
Reference in New Issue
Block a user