PHP code example of kotchuprik / yii2-medium-widget

1. Go to this page and download the library: Download kotchuprik/yii2-medium-widget 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/ */

    

kotchuprik / yii2-medium-widget example snippets


echo \kotchuprik\medium\Widget::widget([
    'model' => $model,
    'attribute' => 'attribute',
]);

echo \kotchuprik\medium\Widget::widget([
    'model' => $model,
    'attribute' => 'attribute',
    'theme' => 'bootstrap',
    'settings' => [
        'buttons' => ['bold', 'italic', 'quote'],
    ],
]);

echo $form->field($model, 'attribute')->widget(\kotchuprik\medium\Widget::className());

echo $form->field($model, 'attribute')->widget(\kotchuprik\medium\Widget::className(), [
    'theme' => 'bootstrap',
    'settings' => [
        'buttons' => ['bold', 'italic', 'quote'],
    ],
]);