PHP code example of zyx / yii2-imperavi-redactor

1. Go to this page and download the library: Download zyx/yii2-imperavi-redactor library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zyx / yii2-imperavi-redactor example snippets


    echo $form->field($model, 'content')->widget(
        Redactor::className(), [
            'options' => [
                'style' => 'height: 300px;'
            ],
            'clientOptions' => [
                'lang'              => 'ru',
                'observeLinks'      => true,
                'convertVideoLinks' => true,
                'autoresize'        => true,
                'placeholder'       => Yii::t('app', 'Redactor placeholder text'),
                'plugins'           => ['table', 'video', 'fontcolor', 'fontfamily', 'fontsize'],
                'buttons'           => ['html', 'formatting', 'bold', 'italic', 'deleted', 'underline', 'horizontalrule',
                                        'alignment', 'unorderedlist', 'orderedlist', 'outdent', 'indent',
                                        , 'link', 'image', 'file'],
                'imageUpload'       => Yii::$app->urlManager->createUrl(['news/upload']),
            ],
        ]
    );