jquery-jsonview icon indicating copy to clipboard operation
jquery-jsonview copied to clipboard

Add callback and marks options

Open knowgod opened this issue 10 years ago • 3 comments

These 2 commits to make the plugin more configurable by adding 3 new options:

jQuery('#json').JSONView(json, { 
    marks:{
        '+':'++',
        '-':'--',
    },
    on_expand: function(collapser){
        console.log(['on_expand', collapser]);
    },
    on_collapse: function(collapser){
        console.log(['on_collapse', collapser]);
    }
});

knowgod avatar Aug 14 '15 08:08 knowgod

Thanks for the PR.

This plugin is written in CoffeScript, you should edit files under src/ instead of dist/jquery.jsonview.js.

yesmeck avatar Aug 14 '15 09:08 yesmeck

As I'm not familiar with CoffeScript it will take some time to investigate how convert my changes into that. So probably later I'll try to PR again. Or you can incorporate my changes at your own.

knowgod avatar Aug 19 '15 17:08 knowgod

+1

codler avatar Nov 18 '16 17:11 codler