cadr-sa/yii2-jsoneditor

Yii2 jsoneditor widget

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 11

Type:yii2-extension

v1.0.0 2014-12-16 14:27 UTC

This package is not auto-updated.

Last update: 2024-10-30 18:50:43 UTC


README

This extension provides the Jsoneditor integration for the Yii2 framework.

Installation

This extension requires Jsoneditor

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist devgroup/yii2-jsoneditor "*"

or add

"devgroup/yii2-jsoneditor": "*"

to the require section of your composer.json.

General Usage

use devgroup\jsoneditor\Jsoneditor;

Jsoneditor::widget(
    [
        'editorOptions' => [
            'modes' => ['code', 'form', 'text', 'tree', 'view'], // available modes
            'mode' => 'tree', // current mode
        ],
        'name' => 'editor', // input name. Either 'name', or 'model' and 'attribute' properties must be specified.
        'options' => [], // html options
    ]
)