stnvh / silverstripe-cmsspellchecker
无需修改核心代码即可添加 TinyMCE 拼写检查功能
1.1.4
2014-11-19 10:42 UTC
Requires
- composer/installers: ~1.0
This package is not auto-updated.
Last update: 2024-09-24 03:13:14 UTC
README
在不修改核心代码的情况下,添加 TinyMCE 拼写检查支持 。使用配置API设置选项。
已测试并在以下版本中工作:3.1 降至 2.4。
由 Stan Hutcheon - Bigfork Ltd
安装
Composer
composer require "stnvh/silverstripe-cmsspellchecker" "~1"
下载
将此仓库克隆到您的 silverstripe 安装文件夹中的 cmsspellchecker
文件夹中。
使用方法
此假设您已在您的 web 服务器上安装了 pspell 或安装了 aspell 二进制文件。
如果您已安装 pspell 模块,它应该可以立即工作。如果您只安装了二进制文件,则需要在 mysite/_config/config.yml
中添加类似以下内容:
CMSSpellChecker: engine: 'PSpellShell' shell: '/usr/local/bin/aspell'
对于 Silverstripe 3.0 之前的版本,通过方法调用设置配置
mysite/_config.php:
CMSSpellChecker::set_engine('PSpellShell'); CMSSpellChecker::set_shell('/usr/local/bin/aspell');
选项
engine
- PSpell (默认)
- PSpellShell
- EnchantSpell
shell
- (与 PSpellShell 一起使用,指定服务器上 aspell 的位置,默认
/usr/bin/aspell
)
通过 composer 安装后,您必须执行 /dev/build