kak/aceeditor

ace editor widget for yii2

dev-master 2017-06-09 13:06 UTC

This package is auto-updated.

Last update: 2024-04-22 03:49:34 UTC


README

AceEditor widgets for Yii2

Preview

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist kak/aceeditor "dev-master"

or add

"kak/aceeditor": "dev-master"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?php
    echo yii\helpers\Html::activeLabel($model,'html_wrap');  
    echo \kak\widgets\aceeditor\AceEditor::widget([
        // You can either use it for model attribute
        'model' => $model,
        'attribute' => 'html_wrap',
        'mode'=>'html', // programing language mode. Default "html"
        'theme'=>'github' // editor theme. Default "github"
    ]);
?>