PHP code example of alexantr / yii2-ace

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

    

alexantr / yii2-ace example snippets


<?= alexantr\ace\Ace::widget(['name' => 'attributeName']) 

<?= $form->field($model, 'attributeName')->widget(alexantr\ace\Ace::className(), [/*...*/]) 

<?= alexantr\ace\Ace::widget([
    'name' => 'attributeName',
    'clientOptions' => [
        'fontSize' => 14,
        'useSoftTabs' => true,
        'maxLines' => 100, // need this option...
    ],
]) 

<?= alexantr\ace\Ace::widget([
    'name' => 'attributeName',
    'containerOptions' => [
        'style' => 'min-height:100px', // ...or this style
    ],
]) 

<?= alexantr\ace\Ace::widget([
    'name' => 'attributeName',
    'mode' => 'javascript',
    'theme' => 'twilight',
    'clientOptions' => [/*...*/],
    'containerOptions' => [/*...*/],
]) 

<?= alexantr\ace\Ace::widget([
    'name' => 'attributeName',
    'presetPath' => '@backend/config/my-ace-config.php',
]) 


return [
    'fontSize' => 14,
    'minLines' => 10,
    'maxLines' => new \yii\web\JsExpression('Infinity'),
    'useSoftTabs' => true,
];