Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

schema-based-json-editor

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schema-based-json-editor

A reactjs, angular2 and vuejs component of schema based json editor.

  • 3.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
64
increased by10.34%
Maintainers
1
Weekly downloads
 
Created
Source

Dependency Status devDependency Status Build Status npm version Downloads

schema-based-json-editor

install

npm i schema-based-json-editor

reactjs component demo
import { JSONEditor } from "schema-based-json-editor/dist/react";
<JSONEditor schema={schema}
    initialValue={initialValue}
    updateValue={this.updateValue}
    theme="bootstrap3"
    icon="fontawesome4"
    locale="zh-cn" />

the online demo: https://plantain-00.github.io/schema-based-json-editor/demo/react/index.html

the source code of the demo: https://github.com/plantain-00/schema-based-json-editor/tree/master/demo/react

angular2 component demo
import { JSONEditorComponent, BooleanEditorComponent, ArrayEditorComponent, EditorComponent, NullEditorComponent, NumberEditorComponent, ObjectEditorComponent, StringEditorComponent, IconComponent } from "schema-based-json-editor/dist/angular";

@NgModule({
    imports: [BrowserModule, FormsModule],
    declarations: [MainComponent, JSONEditorComponent, BooleanEditorComponent, ArrayEditorComponent, EditorComponent, NullEditorComponent, NumberEditorComponent, ObjectEditorComponent, StringEditorComponent, IconComponent],
    bootstrap: [MainComponent],
})
class MainModule { }
<json-editor [schema]="schema"
    [initialValue]="value"
    (updateValue)="updateValue($event)"
    theme="bootstrap3"
    icon="fontawesome4"
    locale="zh-cn">
</json-editor>

the online demo: https://plantain-00.github.io/schema-based-json-editor/demo/angular/index.html

the source code of the demo: https://github.com/plantain-00/schema-based-json-editor/tree/master/demo/angular

vuejs component demo
import "schema-based-json-editor/dist/vue";
<json-editor :schema="schema"
    :initial-value="value"
    @update-value="updateValue(arguments[0])"
    theme="bootstrap3"
    icon="fontawesome4"
    locale="zh-cn">
</json-editor>

the online demo: https://plantain-00.github.io/schema-based-json-editor/demo/vue/index.html

the source code of the demo: https://github.com/plantain-00/schema-based-json-editor/tree/master/demo/vue

properties of the component
  • schema: the json schema object
  • initialValue: the initial json
  • updateValue: the function that is invoked when the json is edited in the editor
  • theme: optional, support "bootstrap3" for now
  • icon: optional, support "bootstrap3" and "fontawesome4" for now
  • locale: optional, support "zh-cn" for now
  • readonly: optional, a boolean value
  • dragula: optional the dragula library object if you want to reorder array by drag and drop
  • markdownit: optional, the markdown-it library object if you want to preview markdown
  • hljs: optional, the highlight.js library object if you want to highlight code
  • forceHttps: optional, a boolean value, if true, the preview url of images will be https:// rather than http://
features
  • reactjs component
  • angular2 component
  • vuejs component
  • common schema fields: title, description, default, readonly
  • object schema fields: properties, required
  • array schema fields: items, minItems, uniqueItems
  • number and integer shema fields: minimum, exclusiveMinimum, maximum, exclusiveMaximum, enum
  • string schema fields: format, enum, minLength, maxLength, pattern
  • image preview, code highlight, markdown preview
change logs

https://github.com/plantain-00/schema-based-json-editor/tree/master/change_logs.md

Keywords

FAQs

Package last updated on 26 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc