用户1007017 / yii2-hyphenator
提供HTML文档客户端连字符分割的Yii2扩展
dev-master
2017-05-09 19:10 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-20 17:01:24 UTC
README
Hyphenator.js的简单包装。它会自动对文本进行连字符分割。
要求
Yii2
用法
通过composer安装此扩展
composer require user1007017/yii2-hyphenator
在您的视图中注册小部件(不要输出它)
use user1007017\hyphenator\Hyphenator;
Hyphenator::widget([
'language' => 'de',
'pluginOptions' => [
'minwordlength' => 4
]
]);
将class="hyphenate"添加到需要分割连字符的元素(子元素会继承此设置)。可以通过添加class="donthyphenate"来停止连字符分割。
GitHub
https://github.com/user1007017/yii2-hyphenator
来源于https://github.com/drenty/yii2-hyphenator
待定
对Hyphenator_Loader.js的支持