PHPackages                             dmstr/yii2-json-editor - 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. dmstr/yii2-json-editor

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

dmstr/yii2-json-editor
======================

Yii2 wrapper for "json-editor/json-editor" (is a fork of "jdorn/json-editor")

1.6.0(1mo ago)966.4k↑148.5%9[2 issues](https://github.com/dmstr/yii2-json-editor/issues)[1 PRs](https://github.com/dmstr/yii2-json-editor/pulls)5BSD-2-ClausePHP

Since Feb 28Pushed 1mo ago6 watchersCompare

[ Source](https://github.com/dmstr/yii2-json-editor)[ Packagist](https://packagist.org/packages/dmstr/yii2-json-editor)[ Docs](https://github.com/dmstr/yii2-json-editor)[ RSS](/packages/dmstr-yii2-json-editor/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (6)Versions (55)Used By (5)

yii2-json-editor
================

[](#yii2-json-editor)

Yii2 wrapper for "[json-editor/json-editor](https://github.com/json-editor/json-editor)" (fork of "[jdorn/json-editor](https://github.com/jdorn/json-editor)").

Configuration
-------------

[](#configuration)

If you want to use additional tested plugins, such as *CKEditor*, *selectize* or *filefly* you can include the following lines in your view

```
JsonEditorPluginsAsset::register($this);

```

See the `suggest` section of [`composer.json`](https://github.com/dmstr/yii2-json-editor/blob/master/composer.json) for information about recommended composer packages.

Changelog
---------

[](#changelog)

### 1.3

[](#13)

- updated `json-editor` to `^2.3.5` (affects custom editor `extends` usage, [see commit](https://github.com/dmstr/yii2-json-editor/commit/731dd3dce28887fabd536f5c5ba37218ba243c73))

### 1.2

[](#12)

See `git log`

Usage
-----

[](#usage)

```
$example_schema = [
    'title' => 'Example JSON form',
    'type' => 'object',
    'properties' => [
        'name' => [
            'title' => 'Full Name',
            'type' => 'string',
            'minLength' => 5
        ],
        'date' => [
            'title' => 'Date',
            'type' => 'string',
            'format' => 'date',
        ],
    ],
];
```

```
$form->field($model, 'example_field')->widget(JsonEditorWidget::className(), [
    'schema' => $example_schema,
    'clientOptions' => [
        'theme' => 'bootstrap3',
        'disable_collapse' => true,
        'disable_edit_json' => true,
        'disable_properties' => true,
        'no_additional_properties' => true,
    ],
]);
```

File picker editors
-------------------

[](#file-picker-editors)

Three string editors render a file picker instead of a plain text input. They all store a single file path as the field value and are selected via the schema `format`:

`format`BackendWidgetAuth (default)`filefly`FileFly (`/filefly/api`)selectizesession/cookie`flysystem`generic filesystem API (`/filemanager/api`)select2session/none`flysystem-rest``eluhr/yii2-flysystem-rest-api`selectizesession/cookie### `flysystem-rest` (drop-in replacement for `filefly`)

[](#flysystem-rest-drop-in-replacement-for-filefly)

`flysystem-rest` mirrors the `filefly` editor (selectize UI, image thumbnail preview, array row handling) but targets the [`eluhr/yii2-flysystem-rest-api`](https://git.hrzg.de/e.luhr/yii2-flysystem-rest-api)module.

By default it works exactly like `filefly`: **session/cookie auth on the same origin, no client configuration.** The read endpoints it uses (`search` and `stream`) are `GET` and accept the logged-in backend session when the API module runs with `enableSessionAuth`. The browser sends the auth cookie automatically, so nothing has to be passed through the widget — consumers only set the schema `format`. The default base URL is `/filemanager/api`.

Migrating an existing `filefly` field is just a format change:

```
'file' => [
    'type' => 'string',
    'format' => 'flysystem-rest',
    // optional per-field overrides:
    // 'apiBaseUrl' => '/filemanager/api',
    // 'storageId'  => 'my-storage',
],
```

That is all that is required for the common (same-origin backend) case.

#### Advanced: overriding defaults / stateless JWT auth

[](#advanced-overriding-defaults--stateless-jwt-auth)

For a different mount point, a storage filter, or **stateless JWT auth** (e.g. a cross-origin or programmatic setup), the widget can inject a global `window.FLYSYSTEMRESTCONFIG` via the optional `flysystemRestConfig` option:

```
$form->field($model, 'example_field')->widget(JsonEditorWidget::class, [
    'schema' => $example_schema,
    'registerPluginAsset' => true,
    'flysystemRestConfig' => [
        'apiBaseUrl'      => \yii\helpers\Url::to(['/filemanager/api'], true),
        'jwt'             => $jwt,   // only for JWT auth mode; omit for session
        'storageId'       => null,
        'imageExtensions' => ['jpg', 'jpeg', 'gif', 'svg', 'png', 'bmp'],
    ],
]);
```

When `jwt` is set, the editor sends `Authorization: Bearer ` on the `search` request; otherwise it relies on the session cookie. The `stream`endpoint (thumbnail previews) always uses plain image `src` URLs.

Plugin Bundles
--------------

[](#plugin-bundles)

This packages contains optional asset bundles for specialized plugings that can be rgistered when activated in the configuration array.

- CKEditorAsset (active per default for backward compatibility reasons)
- JoditAsset
- SceditorAsset
- SimpleMDEAsset

```
$form->field($model, 'example_field')->widget(JsonEditorWidget::className(), [
    'schema' => $example_schema,
    'registerCKEditorAsset' => true, // CKEditorAsset will be registered (default true)
    'registerJoditAsset' => true, // JoditAsset will be registered (default false)
    'registerSceditorAsset' => true, // SceditorAsset will be registered (default false)
    'registerSimpleMDEAsset' => true, // SimpleMDEAsset will be registered (default false)
    'clientOptions' => [
        'theme' => 'bootstrap3',
    ]
]);
```

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance88

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~71 days

Recently: every ~196 days

Total

44

Last Release

41d ago

Major Versions

0.3.5 → 1.0.0-beta12019-06-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b4ab2b6685ec71887908ec8cff261a16cd5bb24c69bb8ab52840e220f175f9d?d=identicon)[schmunk](/maintainers/schmunk)

---

Top Contributors

[![marc7000](https://avatars.githubusercontent.com/u/1118837?v=4)](https://github.com/marc7000 "marc7000 (27 commits)")[![schmunk42](https://avatars.githubusercontent.com/u/649031?v=4)](https://github.com/schmunk42 "schmunk42 (23 commits)")[![gbisurgi](https://avatars.githubusercontent.com/u/18024942?v=4)](https://github.com/gbisurgi "gbisurgi (20 commits)")[![eluhr](https://avatars.githubusercontent.com/u/13000805?v=4)](https://github.com/eluhr "eluhr (15 commits)")[![handcode](https://avatars.githubusercontent.com/u/825574?v=4)](https://github.com/handcode "handcode (6 commits)")[![germanbisurgi](https://avatars.githubusercontent.com/u/13135260?v=4)](https://github.com/germanbisurgi "germanbisurgi (5 commits)")[![a-klapper](https://avatars.githubusercontent.com/u/54941040?v=4)](https://github.com/a-klapper "a-klapper (1 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (1 commits)")

---

Tags

jsonyii2json-editor

### Embed Badge

![Health badge](/badges/dmstr-yii2-json-editor/health.svg)

```
[![Health](https://phpackages.com/badges/dmstr-yii2-json-editor/health.svg)](https://phpackages.com/packages/dmstr-yii2-json-editor)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[skeeks/cms

SkeekS CMS — control panel and tools based on php framework Yii2

13926.0k66](/packages/skeeks-cms)[kdn/yii2-json-editor

JSON editor widget (josdejong/jsoneditor) for Yii 2.

23620.7k4](/packages/kdn-yii2-json-editor)[devgroup/yii2-jsoneditor

Yii2 jsoneditor widget

11101.1k1](/packages/devgroup-yii2-jsoneditor)[nizsheanez/yii2-json-rpc

A lightweight JsonRpc Server and Client for PHP

1834.4k](/packages/nizsheanez-yii2-json-rpc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
