dmstr/yii2-json-editor
最新稳定版本:1.5.1
Composer 安装命令:
composer require dmstr/yii2-json-editor
包简介
Yii2 wrapper for "json-editor/json-editor" (is a fork of "jdorn/json-editor")
关键字:
README 文档
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-editorto^2.3.5(affects custom editorextendsusage, 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, ], ]);
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', ] ]);
统计信息
- 总下载量: 59.87k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: BSD-2-Clause
- 更新时间: 2018-10-19