PHP code example of borales / yii2-ace-widget

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

    

borales / yii2-ace-widget example snippets


// For your model
echo \borales\widgets\ace\Widget::widget([
    'model' => $model,
    'attribute' => 'attribute_name',
]);

// Using with ActiveForm/ActiveField
echo $this->field($model, 'attribute_name')->widget(
    \borales\widgets\ace\Widget::className()
);

// For basic usage
echo \borales\widgets\ace\Widget::widget([
    'name' => 'editor_name',
    'value' => 'your text code',
]);

bash
$ php composer.phar