JSON-Forms

This commit is contained in:
Paminger
2016-06-19 19:41:10 +02:00
parent 83540e068a
commit 377b1ecdd0
11 changed files with 249 additions and 10 deletions
+21
View File
@@ -0,0 +1,21 @@
<div id="<?=$id?>" style="<?=$style?>"></div>
<script>
var container = document.getElementById('<?=$id?>');
var options = {
mode: '<?=$mode?>',
modes: [<?=$modes?>],
onError: function (err) {
alert(err.toString());
},
onModeChange: function (newMode, oldMode) {
console.log('Mode switched from', oldMode, 'to', newMode);
}
};
var json = <?=$json?>;
var <?=$vareditor?> = new JSONEditor(container, options, json);
</script>