devgroup / yii2-ace-widget
Yii2 ACE widget
Installs: 14 204
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 18
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/ace-builds: ~1.1
- yiisoft/yii2: 2.0.*
Requires (Dev)
- yiisoft/yii2-debug: 2.0.*
This package is not auto-updated.
Last update: 2024-11-05 02:58:43 UTC
README
This extension provides the ACE integration for the Yii2 framework.
Installation
This extension requires ace-builds
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist devgroup/yii2-ace-widget "*"
or add
"devgroup/yii2-ace-widget": "*"
to the require section of your composer.json.
General Usage
use devgroup\ace\Ace; Ace::widget([ 'mode' => 'php', // editor mode 'name' => '', // editor name 'options' => [], // html options 'theme' => 'github', // editor theme 'value' => '', // editor default value ]);
or
in view file
<?= yii\helpers\Html::textarea('', '', ['data-editor' => 'html', 'data-read-only' => false]) ?>
and your controller
use devgroup\ace\AceHelper ... AceHelper::setAceScript(controller, theme); ...