Simplify example 14 a bit

This commit is contained in:
jos 2018-02-25 19:59:20 +01:00
parent 9fb29a644d
commit 36e83445ef
1 changed files with 9 additions and 22 deletions

View File

@ -5,7 +5,7 @@
<title>JSONEditor | Translate</title>
<link href="../dist/jsoneditor.css" rel="stylesheet" type="text/css">
<script src="../dist/jsoneditor.min.js"></script>
<script src="../dist/jsoneditor.js"></script>
<style type="text/css">
#jsoneditor {
@ -19,10 +19,6 @@
<p>
JSONEditor has support for multiple languages (i18n), in this case uses <code>pt-BR</code>.
</p>
<p>
<button id="setJSON">Set JSON</button>
<button id="getJSON">Get JSON</button>
</p>
<div id="jsoneditor"></div>
<script>
@ -46,8 +42,6 @@
};
var editor = new JSONEditor(container, options);
// set json
document.getElementById('setJSON').onclick = function () {
var json = {
'array': [1, 2, 3],
'boolean': true,
@ -57,13 +51,6 @@
'string': 'Hello World'
};
editor.set(json);
};
// get json
document.getElementById('getJSON').onclick = function () {
var json = editor.get();
alert(JSON.stringify(json, null, 2));
};
</script>
</body>