forked from vezquex/jsoneditor
-
Notifications
You must be signed in to change notification settings - Fork 2
/
try.html
executable file
·30 lines (28 loc) · 942 Bytes
/
try.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<html>
<head>
<link href="jsoneditor/jquery.json-editor.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jsoneditor/jquery-1.4.2.js"></script>
<script type="text/javascript" src="jsoneditor/jquery.json-editor.js"></script>
<script>
// Setup control buttons at bottom.
$(document).ready(function(){
JSONEditor.prototype.ADD_IMG = 'jsoneditor/add.png';
JSONEditor.prototype.DELETE_IMG = 'jsoneditor/delete.png';
var j = new JSONEditor($("#t"), 400, 400);
j.doTruncation(true);
j.showFunctionButtons();
});
</script>
</head>
<body>
<textarea id="t">{
"names": ["andy", "ben", "sam"],
"some_object": {
"foo": "bar",
"baz": [{ "woah": "there"}],
"long_line": "a b c d e f g h i j | a b c d e f g h i j | match(/dflkjdfkjhdfkjhdf/) | dfjkhsdfh | a b c d e f g h i j"
}
}
</textarea>
</body>
</html>