Gathering detailed insights and metrics for jsoneditor-react-ext
Gathering detailed insights and metrics for jsoneditor-react-ext
Gathering detailed insights and metrics for jsoneditor-react-ext
Gathering detailed insights and metrics for jsoneditor-react-ext
npm install jsoneditor-react-ext
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
1 Stars
70 Commits
1 Forks
2 Watching
4 Branches
1 Contributors
Updated on 05 Oct 2021
CSS (72.31%)
JavaScript (27.69%)
Cumulative downloads
Total Downloads
Last day
0.9%
117
Compared to previous day
Last week
20.9%
712
Compared to previous week
Last month
33.9%
2,009
Compared to previous month
Last year
368.9%
14,147
Compared to previous year
1
2
32
This is a forked version of the json-editor-react When using this as part of a NextJS application we run into the CSS Import Dependency Issue. This is a workaround for that.
npm install --save jsoneditor jsoneditor-react-ext
1import { JsonEditor as Editor } from 'jsoneditor-react-ext'; 2import 'jsoneditor-react/es/editor.min.css';
later in render method:
1render() { 2 return ( 3 <Editor 4 value={yourJson} 5 onChange={this.handleChange} 6 /> 7 ); 8}
If you want use with Ajv:
1import Ajv from 'ajv'; 2 3const ajv = new Ajv({ allErrors: true, verbose: true }); 4 5... 6 7render() { 8 return ( 9 <Editor 10 value={yourJson} 11 onChange={this.handleChange} 12 ajv={ajv} 13 schema={yourSchema} 14 /> 15 ); 16}
If you want use with Ace Editor:
1import ace from 'brace'; 2import 'brace/mode/json'; 3import 'brace/theme/github'; 4 5... 6 7render() { 8 return ( 9 <Editor 10 value={yourJson} 11 onChange={this.handleChange} 12 ace={ace} 13 theme="ace/theme/github" 14 schema={yourSchema} 15 /> 16 ); 17}
Or:
1import 'brace'; 2import 'brace/mode/json'; 3import 'brace/theme/github'; 4 5... 6 7render() { 8 return ( 9 <Editor 10 value={yourJson} 11 onChange={this.handleChange} 12 theme="ace/theme/github" 13 schema={yourSchema} 14 /> 15 ); 16}
Or define your own ace theme
If you using webpack and es6 dynamic imports you can load jsoneditor-react
asynchronously.
You can use react-imported-component or your own implementation
1import importedComponent from 'react-imported-component'; 2 3const JsonEditor = importedComponent(() => import(/* webpackChunkName:'jsoneditor' */'jsoneditor-react'));
Or with Ajv and Ace Editor:
1const JsonEditor = importedComponent(() => Promise.all([ 2 import(/* webpackChunkName:'jsoneditor' */'jsoneditor-react'), 3 import(/* webpackChunkName:'jsoneditor' */'brace'), 4 import(/* webpackChunkName:'jsoneditor' */'ajv'), 5 import(/* webpackChunkName:'jsoneditor' */'brace/mode/json'), 6 import(/* webpackChunkName:'jsoneditor' */'brace/theme/github') 7]).then(([{ JsonEditor: Editor }, ace, Ajv ]) => { 8 const ajv = new Ajv(); 9 return function EditorHoc(props) { 10 return ( 11 <Editor 12 ace={ace} 13 ajv={ajv} 14 theme="ace/theme/github" 15 {...props} 16 /> 17 ); 18 } 19}));
You can view usage of jsoneditor-react
using our storybook.
npm run dev
http://localhost:9001
Right now only one story exporting in storybook: /stories/Editor.jsx
, to add more use /.storybook/config.js
Working on docs
folder.
Right now you can use props declaration
Will be soon!😁
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
70 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More