PHP code example of slexx / yii2-aceeditor

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

    

slexx / yii2-aceeditor example snippets


trntv\aceeditor\Widget::widget([
	// You can either use it for model attribute
	'model' => $my_model,
	'attribute' => 'my_field',

	// or just for input field
	'name' => 'my_input_name',

    'mode'=>'html' // programing language mode. Default "html"
    'theme'=>'github' // editor theme. Default "github"

	// Editor container options
	'containerOptions' => [
		'toolbar' => false,
		'css' => 'wym.css',
	],
]);

$form->field($model, 'field', ['enableClientValidation'=>false])
    ->widget(
        'trntv\aceeditor\Widget',
        [
            'mode' => 'mode',
            ...
        ]
    )

php composer.phar