PHP code example of perminder-klair / yii2-sir-trevor-js

1. Go to this page and download the library: Download perminder-klair/yii2-sir-trevor-js 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/ */

    

perminder-klair / yii2-sir-trevor-js example snippets


<?= $form->field($model, 'content')->widget(\kato\sirtrevorjs\SirTrevor::classname()); 

public function renderSirTrevor()
{
    $convertor = new \kato\sirtrevorjs\SirTrevorConverter();
    return $convertor->toHtml($this->content);
}
 
echo $model->renderSirTrevor() 

public function actions()
{
    return [
        'upload' => [
            'class' => 'kato\actions\SirTrevorUploadAction',
        ],
    ];
}


 $this->widget('\kato\sirtrevorjs\yii1compat\ESirTrevor', array(
    'model' => $model,
    'attribute' => 'content',
)); 

php composer.phar