Files
FHC-Core/application/views/widgets/jsoneditor.php
T
SimonGschnell a21a292da6 dokument upload
2024-01-29 16:48:41 +01:00

22 lines
475 B
PHP
Executable File

<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>