mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
22 lines
475 B
PHP
22 lines
475 B
PHP
<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>
|
|
|
|
|