1jQuery(function(){ 2 jQuery('#plugin__struct .config').each(function(){ 3 var $config = jQuery(this); 4 var container = document.createElement('DIV'); 5 $config.before(container); 6 var editor = new JSONEditor(container, { 7 onChange: function() { 8 $config.val(editor.getText()); 9 }, 10 history: false, 11 mode: 'form', 12 search: false, 13 name: 'config' 14 }); 15 editor.setText($config.val()); 16 $config.hide(); 17 }); 18 19}); 20