PHPackages                             loveorigami/yii2-jsoneditor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. loveorigami/yii2-jsoneditor

ActiveYii2-extension[Parsing &amp; Serialization](/categories/parsing)

loveorigami/yii2-jsoneditor
===========================

Yii2 jsoneditor widget

1.0(10y ago)04.0k[1 issues](https://github.com/loveorigami/yii2-jsoneditor/issues)1GPL-3.0+PHP

Since Jul 31Pushed 6y ago1 watchersCompare

[ Source](https://github.com/loveorigami/yii2-jsoneditor)[ Packagist](https://packagist.org/packages/loveorigami/yii2-jsoneditor)[ RSS](/packages/loveorigami-yii2-jsoneditor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (1)

Jsoneditor Extension for Yii 2
==============================

[](#jsoneditor-extension-for-yii-2)

This extension provides the [Jsoneditor](http://jsoneditoronline.org/) integration for the Yii2 framework. This package is fork from \[DevGroup-ru/yii2-jsoneditor\] () with active form support, because my pull-request is not merged.

Installation
------------

[](#installation)

This extension requires [Jsoneditor](https://github.com/josdejong/jsoneditor/)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

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

```

or add

```
"loveorigami/yii2-jsoneditor": "*"

```

to the require section of your composer.json.

General Usage
-------------

[](#general-usage)

```
use lo\widgets\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
    ]
)
```

or with active form as

```
