dev-master
9999999-devThe extension for using the Kendlik editor
MIT
The Requires
by Delgus
extension yii2 wysiwyg
The extension for using the Kendlik editor
The extension for using the Kendlik editor, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist delgus/yii2-knedlik-wysiwyg=dev-master
or add, (*4)
"delgus/yii2-knedlik-wysiwyg": "dev-master"
to the require section of your composer.json
file., (*5)
Once the extension is installed, simply use it in your code by(properties 'name' and 'id' - required) :, (*6)
<?= \delgus\knedlik\Knedlik::widget( [ 'name' => 'knedlick', 'id' => 'knedlick', 'clientOptions' => [ 'lang' => 'ru', 'outside' => ['bold', 'italic'], 'style' => 'flat', ], ] ) ?>
In ActiveForm:, (*7)
<?= $form->field($model, 'subject')->widget(\delgus\knedlik\Knedlik::class,['id' => 'knedlick']) ?>
For upload images: - In view show property upload:, (*8)
<?= \delgus\knedlik\Knedlik::widget( [ 'name' => 'knedlick', 'id' => 'knedlick', 'clientOptions' => [ ... 'upload' => 'site/upload' ... ], ] ) ?>
public function behaviors() { return [ ... 'knedlik' => [ 'class' => DisableCsrfBehavior::classname(), 'actions' => ['upload'], ], ... ]; } public function actions() { return [ ... 'upload' => [ 'class' => KnedlikAction::class, 'uploadDir' => '/uploads' ], ... ]; }
Thank you), (*9)
The extension for using the Kendlik editor
MIT
extension yii2 wysiwyg