定制 silverstripe/spellcheck 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

silverstripe/spellcheck

最新稳定版本:2.5.2

Composer 安装命令:

composer require silverstripe/spellcheck

包简介

Improves spellcheck support for SilverStripe CMS, including an implementation for HunSpell.

README 文档

README

NOTE: This module is no longer commercially supported in Silverstripe CMS 5 and it does not provide a CMS5-compatible version.

CI

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

统计信息

  • 总下载量: 161.77k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 3
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-07-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固