PHP code example of echotrue / yii2-markdown

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

    

echotrue / yii2-markdown example snippets


<?= $form->field($model, 'username')->widget(\echtrue\markdown\MarkDown::className(), [
        'options'    => ['id' => 'yii-markdown','width'=>'1000px'],
        'model'      => $model,
        'attribute' => 'username',
    ]) 

php composer.phar 

public function actions()
    {
        return [
            'upload'  => [
                'class' => 'echotrue\markdown\UploadAction',
            ],
        ];
    }

<?= \echotrue\markdown\MarkDown::widget([
        'options' => [
            'id' => 'yii-markdown',
            //'height'=>"100px",
        ],
        'name'    => 'username',
    ]);