• Stars
    star
    561
  • Rank 79,400 (Top 2 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 13 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

JSON editor jQuery plugin

JSON editor jQuery plugin

A JSON editor component for you web apps/pages. Blog post

Live example

INSTALLATION

Include these lines into your HTML:

    <link rel="stylesheet" href="jsoneditor.css"/>
    <script src="jquery.min.js"></script>
    <script src="jquery.jsoneditor.js"></script>

USAGE

    var myjson = { any: { json: { value: 1 } } };
    var opt = { 
        change: function(data) { /* called on every change */ },
        propertyclick: function(path) { /* called when a property is clicked with the JS path to that property */ }
    };
    /* opt.propertyElement = '<textarea>'; */ // element of the property field, <input> is default
    /* opt.valueElement = '<textarea>'; */  // element of the value field, <input> is default
    $('#mydiv').jsonEditor(myjson, opt);

Bitdeli Badge