-
Notifications
You must be signed in to change notification settings - Fork 12
/
bug.html
68 lines (64 loc) · 1.76 KB
/
bug.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><juicy-jsoneditor></title>
<link rel="stylesheet" href="http://juicy.github.io/juicy-tile-list/examples/github-markdown.css">
<script type="text/javascript" src="../jsoneditor/asset/ace/ace.js"></script>
<!-- Importing Web Component's Polyfill -->
<script src="//cdn.jsdelivr.net/webcomponentsjs/0.6.0/webcomponents.min.js"></script>
<!-- Importing Custom Elements -->
<link rel="import" href="juicy-jsoneditor.html">
<style>
body {
font-family: sans-serif;
min-width: 200px;
width: 70%;
margin: 0 auto;
padding: 30px;
height: 100%;
}
juicy-jsoneditor{
height: 18em;
}
#demo{
display: flex;
justify-content: space-around;
}
#examples{
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-content: center;
align-items: center;
}
#examples>section{
width: 21em;
margin: 0 2em;
}
</style>
</head>
<body><article class="markdown-body">
<!-- Using Custom Elements -->
<template bind>
<h1>Ace editor bug</h1>
<juicy-jsoneditor json="{{json}}" mode="code"></juicy-jsoneditor>
</template>
<script type="text/javascript">
document.addEventListener("polymer-ready", function(){
json = {
'array': [1, 2, 3],
'boolean': true,
'null': null,
'number': 123,
'object': {'a': 'b', 'c': 'd'},
'string': 'Hello World'
};
document.querySelector("template").model = appModel = {json: json};
window.json = json;
console.info("Play with me! I'm the `json` given to all those editors", json);
});
</script>
</article>
</body>
</html>