dmstr / yii2-json-editor
Yii2 wrapper for "json-editor/json-editor" (is a fork of "jdorn/json-editor")
Installs: 36 381
Dependents: 5
Suggesters: 0
Security: 0
Stars: 7
Watchers: 8
Forks: 6
Open Issues: 1
Type:yii2-extension
Requires
- npm-asset/json-editor--json-editor: ^2.5.0
- yiisoft/yii2: ~2.0.0
Suggests
- 2amigos/yii2-ckeditor-widget: Recommended assets for CKEditor plugin in json-editor
- 2amigos/yii2-selectize-widget: Recommended assets for selectize plugin in json-editor
- dev-master
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.3.0-rc1
- 1.3.0-beta1
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.0
- 1.0.0-rc1
- 1.0.0-beta1
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3.0
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-dev/filefly-editor-image-only-preview
- dev-dev/html-purifier-filter-validator
- dev-feature/disable-editor
- dev-feature/plugin-asset-option
- dev-feature/disable-init-ajax
This package is auto-updated.
Last update: 2023-03-21 12:45:23 UTC
README
Yii2 wrapper for "json-editor/json-editor" (fork of "jdorn/json-editor").
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
for information about recommended composer packages.
Changelog
1.3
- updated
json-editor
to^2.3.5
(affects custom editorextends
usage, see commit)
1.2
See git log
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, ], ]);