Coder Social home page Coder Social logo

editor-jsonschema's Introduction

rc-editor-jsonschema


React EditorJSON Component for Ant Design Landing Intranet.

NPM version build status codecov npm download

Example

http://localhost:8008/examples/

online example: http://ant-motion.github.io/editor-jsonschema/

install

rc-editor-jsonschema

Usage

var EditorJSON = require('rc-editor-jsonschema');
var React = require('react');
React.render(<EditorJSON />, container);

API

props

name type default description
data object null ant design landing 的 dataSource.
dataBasic object null 源数据结构,如果 data 数据里的 array 全部删除后,将参照此数据源再新增
schema object null 凤蝶的 schema 简单的解析,以 Object 和 Array 做主类,结合 landing 的数据,子级目前只支持 String(default), Text, Enum, Image, File, Boolean。
selected string[] null 默认树状选择器
ignore string[] null 不显示 schema 数据里的 key
className string null className
prefixCls string rc-editor-jsonschema prefix class.
useMediumEditor boolean true 输入框的模式,false 为 input 形式,true 为 MediumEditor 模式,产出的 string 将带 html 标签,如 <p>标题文字</p>
uploadProps object null 上传组件的 props.
uploadImageSize number 1m 图片上传的大小限制.
uploadVideoSize number 2m 视频上传的大小限制.
onChange (data: object) => void; null 数据变更的回调。
onSelectedChange (selected: string[]) => void; null 选择器变更的回调。

说明

如果是数组形式,请必须将数据里的数值全部添加到 schema 里,并设置默认,用 ignore 隐藏的数值,如 className 数值, 如果不添加,将不会有出现在新增数据里。

License

rc-editor-jsonschema is released under the MIT license.

editor-jsonschema's People

Contributors

jljsj33 avatar ycjcl868 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jekin6 baiheinet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.