DavidDurman / FlexiJsonEditor

JSON editor jQuery plugin
http://jsonmate.com
Other
560 stars 139 forks source link

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="https://github.com/DavidDurman/FlexiJsonEditor/blob/master/jsoneditor.css"/>
    <script src="https://github.com/DavidDurman/FlexiJsonEditor/raw/master/jquery.min.js"></script>
    <script src="https://github.com/DavidDurman/FlexiJsonEditor/raw/master/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