borales/yii2-ace-widget Yii2 Ace (Ajax.org Cloud9 Editor) Widget

aceace-editorcloud9editor

Yii2 Ace (Ajax.org Cloud9 Editor) Widget

Latest Stable Version Total Downloads Latest Unstable Version License

Ace (Ajax.org Cloud9 Editor) source repository can be found here - https://github.com/ajaxorg/ace.

Original demo can be found here - http://ace.c9.io/#nav=embedding.

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require "borales/yii2-ace-widget" "*"

or add

"borales/yii2-ace-widget": "*"

to the require section of your composer.json file.

Usage (with default options)

// For your model
echo \borales\widgets\ace\Widget::widget([
    'model' => $model,
    'attribute' => 'attribute_name',
]);

// Using with ActiveForm/ActiveField
echo $this->field($model, 'attribute_name')->widget(
    \borales\widgets\ace\Widget::className()
);

// For basic usage
echo \borales\widgets\ace\Widget::widget([
    'name' => 'editor_name',
    'value' => 'your text code',
]);

Options

  • mode - code language (default is php).
  • theme - color scheme (default is github).
  • editable - whether to display editable text input or just highlight the output (default is true).
  • autocompletion - whether to enable simple autocompletion functionality (only with editable = true).
  • aceOptions - ACE's editor options.

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



0.0.1 is the latest of one release



BSD-3-Clause license
Stats
2 github stars & 1 github forks
0 downloads in the last day
0 downloads in the last 30 days
170 total downloads