A simple wrapper for Hyphenator.js. It automatically hyphenates texts.
Requirements ¶
- Yii2
Usage ¶
- Install this extension via composer:
composer require drenty/yii2-hyphenator
- Register the widget in your view (do not echo it):
Hyphenator::widget([
'language' => 'en',
'pluginOptions' => [
'minwordlength' => 4
]
]);
- Add class="hyphenate" to the elements whose text should be hyphenated (children do inherit this setting). Hyphenation can be stopped by adding class="donthyphenate".
GitHub ¶
https://github.com/drenty/yii2-hyphenator
To come ¶
- Support for Hyphenator_Loader.js
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.