-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.html
59 lines (56 loc) · 2.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
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>JSON to Markdown Table</title>
<link rel="stylesheet" type="text/css" href="dist/bundle.css">
</head>
<body ng-cloak>
<div ng-controller="appController" ng-cloak>
<h1 id="page-title">JSON to Markdown Table</h1>
<div id="main-content">
<div class="section">
<div class="section-header">
<span>JSON</span>
<button class="copy-button" ng-click="copyJson()">Copy</button>
</div>
<textarea
ng-show="jsonInputVisible || !processed"
placeholder="Enter your JSON here"
id="input-json"
class="json-field"
ng-model="jsonInput"
rows="5"
md-select-on-focus
ng-change="jsonToMarkdownTable()"
ng-blur="hideJsonInput()"></textarea>
<div
id="formatted-json"
class="json-field"
hljs hljs-source="jsonOutput"
hljs-language="json"
ng-show="processed && !jsonInputVisible"
ng-click="showJsonInput()"
title="Click to edit"></div>
</div>
<div id="error-message" ng-if="error">{{error.message}}</div>
<div class="section" ng-if="processed">
<div class="section-header">
<span>Markdown Table</span>
<button class="copy-button" ng-click="copyMarkdown()">Copy</button>
</div>
<div id="markdown-preview" class="table-preview">
<div hljs hljs-source="markdownOutput" hljs-language="markdown"></div>
</div>
</div>
<div class="section" ng-if="processed">
<div class="section-header">
<span>Table Preview</span>
<button class="copy-button" ng-click="copyHtml()">Copy</button>
</div>
<div class="table-preview" ng-bind-html="htmlOutput"></div>
</div>
</div>
</div>
<script type="text/javascript" src="dist/bundle.js"></script>
</body>
</html>