-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
106 lines (101 loc) · 5.42 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Table2MD</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='styles.css'>
</head>
<body>
<div class="header-container">
<h2>Table2MD - Convert Tables To Markdown</h2>
<div class="button-container">
<div class="message-box" id="message-box"></div>
<button id="btn-convert" title="Convert again to get different possible results">Convert</button>
<button id="btn-copy">Copy</button>
</div>
</div>
<div class="options-container">
<input type="checkbox" id="header-first-row" value="headerFirstRow" checked>
<label for="header-first-row">First row as header</label>
<div id="html-options" style="display: inline-block;">
<input type="checkbox" id="checkbox-link" value="convertLink" checked>
<label for="checkbox-link">Convert links</label>
<input type="checkbox" id="checkbox-code" value="convertCode" checked>
<label for="checkbox-code">Convert code tags</label>
<input type="checkbox" id="checkbox-br" value="convertLnBrk">
<label for="checkbox-br">Convert line breaks</label>
</div>
<div id="other-options" style="display: inline-block;">
<input type="checkbox" id="checkbox-trim-ws" value="trimWhiteSpace" checked>
<label for="checkbox-trim-ws">Trim whitespace</label>
</div>
<input type="checkbox" id="checkbox-trim-bl" value="trimBlankLines" checked>
<label for="checkbox-trim-bl">Trim blank lines</label>
<br>
<label for="pipe-options">Pipe characters:</label>
<Select name="pipe-options" id="pipe-options">
<option value=standard>Escape</option>
<option value=obsidian title="For obsidian.md">Escape (Obsidian)</option>
</Select>
<label for="header-options">Header style:</label>
<Select name="header-options" id="header-options">
<option value="">None</option>
<option value="**">Bold</option>
<option value="*">Italic</option>
<option value="`">Code</option>
</Select>
<label for="column-options">First column style:</label>
<Select name="column-options" id="column-options">
<option value="">None</option>
<option value="**">Bold</option>
<option value="*">Italic</option>
<option value="`">Code</option>
</Select>
<label for="width-options">Table width:</label>
<Select name="width-options" id="width-options">
<option value="header" selected>Same as header</option>
<option value="fill">Fill</option>
<option value="trim">Trim</option>
<option value="custom">Custom</option>
</Select>
<div id="width-input-div" style="display: inline-block;">
<input type="text" id="width-input-box" width="20px" style="width: 50px; display: inline-block;" placeholder="Width" title="Enter table width">
<div style="display: inline-block;" id="width-help"><a href="#">?</a></div>
</div>
</div>
<div class="input-container">
<div class="textarea-container">
<div class="textarea-header">
<select name="converter-mode-options" id="converter-mode-options">
<option value="html" data-delimiter="html">HTML</option>
<option value="space" data-delimiter=" {2,}">Spaces</option>
<option value="spaceSmart" data-delimiter="spaceSmart">Space (Smart selection)</option>
<option value="xls" data-delimiter=\t>Excel (Tab)</option>
<option value="csv" data-delimiter=",">CSV (Comma)</option>
<option value="dash" data-delimiter="-">Dash</option>
<option value="advanced" data-delimiter="advanced">Advanced smart selection</option>
</select>
<div id="advanced-options" style="display: inline-block;">
<input type="text" id="delimiter-input" style="width: 60px;" placeholder="Delimiter"
title="Enter your own delimiter, leave blank for smart selection of space. Supports regex">
<input type="text" id="cell-character-input" style="width: 40px;" placeholder="Cell char"
title="By default, only alphanumeric characters are chosen as the start and end of a cell, add additional characters here">
<input type="range" min="1" max="100" value="50" class="slider" style="width: 200px;"
id="threshold-slider" title="Set a threshold percentage">
<div id="slider-percentage" style="display: inline-block;"></div>
</div>
</div>
<textarea id="text-input" type="text"></textarea>
</div>
<div class="textarea-container">
<div class="textarea-header">Markdown</div>
<textarea id="markdown-output" type="text" readonly></textarea>
</div>
</div>
<div id="buffer" style="display:none"></div>
<a href="https://github.com/Xre0uS/Table2MD">Documentation</a>
<script type="text/javascript" src="converter.js"></script>
</body>
</html>