Skip to content

This extension provides the ACE integration for the Yii2 framework.

License

Notifications You must be signed in to change notification settings

DevGroup-ru/yii2-ace-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ACE Editor Extension for Yii 2

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);
...

About

This extension provides the ACE integration for the Yii2 framework.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages