user1007017 / yii2-hyphenator
Yii2 extension that provides client-side hyphenation of HTML documents
Installs: 30
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Language:JavaScript
Type:yii2-extension
Requires
- php: >=5.4.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-11-20 17:24:53 UTC
README
A simple wrapper for Hyphenator.js. It automatically hyphenates texts.
Requirements
Yii2
Usage
Install this extension via composer:
composer require user1007017/yii2-hyphenator
Register the widget in your view (do not echo it):
use user1007017\hyphenator\Hyphenator;
Hyphenator::widget([
'language' => 'de',
'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/user1007017/yii2-hyphenator
Fork of https://github.com/drenty/yii2-hyphenator
To come
Support for Hyphenator_Loader.js