mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
JSON-Forms
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user