定制 drmartingonzo/ss-tinymce-charcount 二次开发

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

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

drmartingonzo/ss-tinymce-charcount

Composer 安装命令:

composer require drmartingonzo/ss-tinymce-charcount

包简介

Plugin for tinyMCE in siverstripe to count characters

README 文档

README

Screenshot of TinyMCE plugin

Installation

composer require drmartingonzo/ss-tinymce-charcount ^1.1.0

Requirements

  • SilverStripe CMS ^4.0

Enable plugin

In your _config.php file, add :

use SilverStripe\Forms\HTMLEditor\HtmlEditorConfig;
use SilverStripe\Core\Manifest\ModuleResourceLoader;

Then add whatever plugins you wish to enable, + charcount

HtmlEditorConfig::get('cms')
->enablePlugins([
    'template',
    'fullscreen',
    'hr',
    'contextmenu',
    'charmap',
    'visualblocks',
    'lists',
    'charcount' => ModuleResourceLoader::resourceURL('drmartingonzo/ss-tinymce-charcount:client/dist/js/bundle.js'),
])

Finally run dev/build with flush to remove previous TinyMCE javascript cache.

Adding a max character attribute to a TinyMCE instance

Set data-maxchar on HTMLEditorField. Example :

HTMLEditorField::create(
    "Content",
    'Content'
)->setAttribute('data-maxchar', 526),

Adding a max word attribute to a TinyMCE instance

Set data-maxword on HTMLEditorField. Example :

HTMLEditorField::create(
    "Content",
    'Content'
)->setAttribute('data-maxword', 120),

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: JavaScript

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-04-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固