yii2-imperavi-redactor
Imperavi Redactor WYSIWYG widget (OEM-licensed for Yii)., (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist yiizh/yii2-imperavi-redactor
or add, (*4)
"yiizh/yii2-imperavi-redactor": "*"
to the require section of your composer.json
file., (*5)
Usage
<?= yiizh\redactor\Redactor::widget(['name' => 'attributeName']) ?>
Configuring the Imperavi Redactor options should be done using the clientOptions attribute:, (*6)
<?= 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:, (*7)
<?= $form->field($model,'attributeName')->widget(Redactor::className(),['clientOptions' => ['lang' => \Yii::$app->language]]) ?>