Socket
Socket
Sign inDemoInstall

react-json-editor-ajrm

Package Overview
Dependencies
13
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-json-editor-ajrm

A stylish, editor-like, modular, react component for viewing, editing, and debugging javascript object syntax!


Version published
Weekly downloads
57K
decreased by-9.62%
Maintainers
1
Install size
199 kB
Created
Weekly downloads
 

Readme

Source

react-json-editor-ajrm



A stylish, editor-like, modular, react component for viewing, editing, and debugging javascript object syntax!

Installing Dependency

  • Using node package manager:
   $ npm i --save react-json-editor-ajrm

How to Use

    import JSONInput from 'react-json-editor-ajrm';

    <JSONInput
        placeholder = { sampleObject }
        colors      = { darktheme }
        height      = '550px'
    />

Live Demo ? Test it right away!

  1. Clone or fork this Github repository
  2. Go to footFolder/example/:
    $ cd path/to/repo/example
  1. Install example project dependencies:
    $ npm i
  1. Serve sample website to port 8080:
   $ npm start
  1. Open http://localhost:8080 in the web browser

Latest Release Notes - May 8, 2018

  1. Enhanced validations and information.
  2. Previous issue where the content format changed to due errors in syntax, has been fixed.
  3. Includes additional properties to further customize component.
  4. Version 2.0.0, contains a do-over of logic core mechanics. It is advised to update this dependency as soon as possible.
  5. Component now contains some subtle transitions effects based on the syntax's status.
  6. New light theme included in example files. Enjoy!

Features

  1. Write as if you are in a text editor.
  2. Checks for syntax mistakes and provides feedback.
  3. You can customize color palette as you please.
  4. Accepts a javascript object in props.placeholder to display after component mounts.
  5. For any valid textContent, calculates and makes available in this.state as plain text, markup text, and javascript object.

Component Properties

NameDescriptionTypeRequired
idA unique id to identify component.stringMandatory
colorsContains the following properties to customize the color used for each data type:
                `default`, `string`, `number`, `colon`, `keys`, `keys_whiteSpace`, `primitive`, 
                `error`, `background`, and `background_warning`                                        | object  | Optional  |

| confirmGood | Send false if you would like for the checkmark to confirm good syntax to be hidden. | boolean | Optional | | height | Set a specific height for the entire component | string | Optional | | viewOnly | Send true if you would like for content shown not to be editable. | boolean | Optional | | placeholder | Send a valid javascript object to be shown once when component is mounted | object | Optional | | onChange | Whenever onBlur event takes place it will return content values | object | Optional |

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Keywords

FAQs

Last updated on 09 May 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc