PHP code example of lav45 / yii2-aceeditor
1. Go to this page and download the library: Download lav45/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/ */
lav45 / yii2-aceeditor example snippets
use lav45\aceEditor\AceEditorWidget;
echo $form->field($model, 'content')->widget(AceEditorWidget::className(), [
'theme' => 'xcode',
'mode' => 'html',
'showPrintMargin' => false,
'fontSize' => 14,
'height' => 300,
'options' => [
'style' => 'border: 1px solid #ccc; border-radius: 4px;'
]
]);
// Ace editor without model
echo AceEditorWidget::widget([
'name' => 'description',
'value' => 'same text',
]);
php composer.phar