-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathindex.html
More file actions
141 lines (130 loc) · 5.04 KB
/
index.html
File metadata and controls
141 lines (130 loc) · 5.04 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Markdown Table Maker</title>
<style>
#markdownResult {
padding: 5px;
}
#markdownResult > table {
margin: auto;
}
#markdownResult > table,
tr,
td,
th {
border: 1px solid #DDDDDD;
border-collapse: collapse;
font-weight: normal;
white-space: nowrap;
}
td,
th {
padding: 3px;
}
</style>
</head>
<body id="tablemaker">
<div style="width:100%;max-width:800px;text-align:center;margin:auto;">
<h2 style="text-align:center;">Markdown Table Generator</h2>
<div id="headerColors">
<div style="display:inline-block;background-color:green;width:20%!important;height:6px!important;"></div>
<div style="display:inline-block;background-color:blue;width:20%;height:6px;"></div>
<div style="display:inline-block;background-color:red;width:20%;height:6px;"></div>
<div style="display:inline-block;background-color:orange;width:20%;height:6px;"></div>
</div>
<h4 style="text-align:center;">Paste here from Excel or another delimited source (such as a CSV file) and get a markdown-ready table below.<br />Accepts tab-delimited and comma-delimited text.</h4>
<br />
<textarea style="width:80%;" id="pastedText" placeholder="Paste here" rows="9"></textarea>
<br />
<div style="text-align:center;">
<label>Choose Delimiter: </label>
<select id="selectDelimType">
<option value='auto' selected>Auto</option>
<option value='tab'>Tab</option>
<option value='comma'>Comma</option>
<option value='space'>Space</option>
</select>
<br />
<label>
<input type="checkbox" id="checkCenterText" checked /> Center-align text
</label>
<br />
<label>
<input type="checkbox" id="checkBoldHeader" checked /> Bold first row
</label>
<br />
<label>
<input type="checkbox" id="checkBoldFooter" /> Bold last row
</label>
<br />
<label>
<input type="checkbox" id="checkFormatNumbers" /> Format numbers
</label>
<br />
<h5>Wiki tables</h5>
<br />
<label>
<input type="checkbox" id="checkWikiFormat" /> Use Wiki table (<a href="https://en.wikipedia.org/wiki/Help:Table" target="_blank">?</a>)
</label>
<br />
<br />
<label>
Empty cell color <input type="text" id="emptyCellBackgroundColor" />
</label>
<br />
<label>
Header cell color <input type="text" id="headerBackgroundColor" />
</label>
<br />
<label>
Table caption <input type="text" id="inpTableCaption" disabled/>
</label>
</div>
<br />
<div style="text-align:center;color:green;font-size:18px;font-weight:bold;display:none;" id="copySuccess">
Done!
<br /> Press Ctr+C to copy
</div>
<div style="text-align:center;color:red;font-size:18px;font-weight:bold;display:none;" id="copyError">
Error!
<br /> Something went wrong :(
</div>
<div>
<textarea style="width:80%;" id="tableResult" rows="9"></textarea>
</div>
<br />
<div style="text-align:center;font-size:14px;display:none;" id="previewSuccess">
<strong>Preview of table</strong>
<br />
</div>
<br />
<div id="markdownResult" style="background-color:#ffffff;margin:auto;">
</div>
</div>
<div style="height:30px;"></div>
<hr>
<div style="height:30px;"></div>
<div style="text-align:center;"><a href="https://github.com/jakebathman/Markdown-Table-Generator/issues/new" target="_blank">Report a bug (GitHub account required)</a></div>
<br />
<div style="text-align:center;"><a href="https://github.com/jakebathman/Markdown-Table-Generator" target="_blank">Source Code</a></div>
<br />
<div style="text-align:center;color:#666;">
<p>Copyright © 2016 Jake Bathman (<a href="https://github.com/jakebathman/">github.com/jakebathman</a>)
</p>
<p>This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See <a target="_blank" href="http://www.wtfpl.net/">http://www.wtfpl.net/</a> for more details. </p>
<a target="_blank" href="http://www.wtfpl.net/"><img src="http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-badge-1.png" width="80" height="31" alt="WTFPL" /></a>
<a target="_blank" href="http://www.wtfpl.net/">
<img src="http://www.wtfpl.net/wp-content/uploads/2012/12/wtfpl-badge-4.png" width="80" height="15" alt="WTFPL" />
</a>
</div>
<!-- Local jQuery file included, but switch the comments below to load from Google's jQuery CDN instead -->
<!-- <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> -->
<script src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/micromarkdown.js"></script>
<script src="tableMaker.js"></script>
<script src='js/spectrum.js'></script>
<link rel='stylesheet' href='css/spectrum.css' />
</body>
</html>