mmedojevicbg / yii2-text-area-tokens
Text area with clickable tokens for Yii2 forms
Installs: 337
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 2
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-12-10 20:52:27 UTC
README
This is drop-in replacement for textarea form element. It provides tokens below form element. Text is automatically inserted into textarea by clicking one of tokens.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist mmedojevicbg/yii2-text-area-tokens "dev-master"
or add
"mmedojevicbg/yii2-text-area-tokens": "dev-master"
to the require section of your composer.json
file.
Usage
echo TextAreaTokens::widget(['model' => $model, 'attribute' => 'textfield1', 'tokens' => ['first_name', 'last_name', 'phone_number'], 'options' => ['rows' => 8, 'cols' => 100]])