dev-master
9999999-devYii2 ajax.org Ace Editor widget
BSD-3-Clause
The Requires
- yiisoft/yii2 ^2.0.0
- bower-asset/ace-builds ^1.2.3
by Toir Tuychiyev
yii code editor aceeditor
Wallogit.com
2017 © Pedro Peláez
Yii2 ajax.org Ace Editor widget
It is Ace Editor integration for Yii2 framework., (*1)
Ace Editor demo can be found here, (*2)
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
composer require toir427/yii2-aceeditor "dev-master"
or add, (*5)
"toir427/yii2-aceeditor": "*"
to the require section of your composer.json file., (*6)
Using model, (*7)
\toir427\aceeditor\AceEditor::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"
'readOnly'=>'true' // Read-only mode on/off = true/false. Default "false"
]);
With active field, (*8)
$form->field($model, 'field')->widget(
\toir427\aceeditor\AceEditor::className(),
[
'mode'=>'html', // programing language mode. Default "html"
'theme'=>'github', // editor theme. Default "github"
'readOnly'=>'true' // Read-only mode on/off = true/false. Default "false"
]
)
Lists of all available modes and themes see here, (*9)
Yii2 ajax.org Ace Editor widget
BSD-3-Clause
yii code editor aceeditor