-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
46 lines (40 loc) · 1.2 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><csv-preview></title>
<!-- Polyfill Web Components support -->
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<!-- Importing Custom Element -->
<link rel="import" href="csv-preview.html">
<style>
.controls {
margin: 10px 0 50px 0;
display: block;
}
.controls textarea,
.controls button {
display: block;
margin: 0 auto;
}
.controls textarea {
margin-bottom: 5px;
}
</style>
</head>
<body>
<section class="controls">
<textarea cols="50" rows="10"></textarea>
<!--
to put structured data (array of map) need to do something like this
<script>
var structuredData = [ {IRGEX: "1",IRGIM: "18",Summer: "0.82",Winter: "0.82"}, {IRGEX: "1",IRGIM: "33",Summer: "0.28",Winter: "0.28"} ];
</script>
<button onclick="document.querySelector('csv-preview').data = structuredData;">Preview</button>
-->
<button onclick="document.querySelector('csv-preview').data = document.querySelector('textarea').value">Preview</button>
</section>
<!-- Using Custom Elements -->
<csv-preview data="" separator=""></csv-preview>
</body>
</html>