yiizh / yii2-imperavi-redactor
Imperavi Redactor WYSIWYG widget (OEM-licensed for Yii).
Installs: 349
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-12-26 15:04:56 UTC
README
Imperavi Redactor WYSIWYG widget (OEM-licensed for Yii).
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yiizh/yii2-imperavi-redactor
or add
"yiizh/yii2-imperavi-redactor": "*"
to the require section of your composer.json
file.
Usage
<?= yiizh\redactor\Redactor::widget(['name' => 'attributeName']) ?>
Configuring the Imperavi Redactor options should be done using the clientOptions attribute:
<?= yiizh\redactor\Redactor::widget(['name' => 'attributeName', 'clientOptions' => ['lang' => \Yii::$app->language]]) ?>
If you want to use the Imperavi Redactor widget in an ActiveForm, it can be done like this:
<?= $form->field($model,'attributeName')->widget(Redactor::className(),['clientOptions' => ['lang' => \Yii::$app->language]]) ?>