-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmarkdown-previewer.html
More file actions
214 lines (198 loc) · 6.67 KB
/
Copy pathmarkdown-previewer.html
File metadata and controls
214 lines (198 loc) · 6.67 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Markdown Previewer Plugin Documentation</title>
<style>
:root {
--bg: #fdfdfd;
--fg: #1a1a1a;
--accent: #0f766e;
--accent-light: #e6f5f3;
--border: #d0d7de;
--code-bg: #f4f6f8;
--table-stripe: #f8fafb;
--shadow: rgba(0,0,0,0.06);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
color: var(--fg);
background: var(--bg);
line-height: 1.6;
max-width: 52rem;
margin: 0 auto;
padding: 2rem 1.5rem 4rem;
}
header { border-bottom: 3px solid var(--accent); padding-bottom: 1.2rem; margin-bottom: 2rem; }
header h1 { font-size: 2rem; color: var(--accent); }
header p.subtitle { color: #555; margin-top: 0.3rem; }
header .meta { font-size: 0.85rem; color: #777; margin-top: 0.5rem; }
nav { background: var(--accent-light); border: 1px solid var(--border); border-radius: 6px; padding: 1rem 1.5rem; margin-bottom: 2.5rem; }
nav h2 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin-bottom: 0.5rem; }
nav ol { padding-left: 1.3rem; }
nav li { margin: 0.25rem 0; }
nav a { color: var(--accent); text-decoration: none; }
nav a:hover { text-decoration: underline; }
section { margin-bottom: 2.5rem; }
h2 { font-size: 1.4rem; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 0.3rem; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; margin: 1.2rem 0 0.5rem; }
p, li { margin-bottom: 0.5rem; }
ul, ol { padding-left: 1.4rem; }
code {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
background: var(--code-bg);
padding: 0.15em 0.35em;
border-radius: 3px;
font-size: 0.9em;
}
pre {
background: var(--code-bg);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1rem 1.2rem;
overflow-x: auto;
font-size: 0.88rem;
line-height: 1.5;
margin: 0.8rem 0 1rem;
}
pre code { background: none; padding: 0; }
table { width: 100%; border-collapse: collapse; margin: 0.8rem 0 1rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55rem 0.8rem; border: 1px solid var(--border); }
th { background: var(--accent-light); font-weight: 600; }
tr:nth-child(even) td { background: var(--table-stripe); }
.diagram {
background: var(--code-bg);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1.2rem;
font-family: "SFMono-Regular", Consolas, monospace;
font-size: 0.85rem;
line-height: 1.55;
overflow-x: auto;
white-space: pre;
margin: 0.8rem 0 1rem;
}
.callout {
background: var(--accent-light);
border-left: 4px solid var(--accent);
padding: 0.8rem 1rem;
border-radius: 0 6px 6px 0;
margin: 1rem 0;
}
.file-tree { list-style: none; padding-left: 0; font-family: monospace; font-size: 0.9rem; }
.file-tree ul { list-style: none; padding-left: 1.5rem; }
footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: #777; }
</style>
</head>
<body>
<header>
<h1>Markdown Previewer Plugin</h1>
<p class="subtitle">Preview Markdown and HTML files with live rendering, from the Code on the Go editor</p>
<div class="meta">Author: App Dev for All · Package: <code>com.codeonthego.markdownpreviewer</code></div>
</header>
<nav>
<h2>Contents</h2>
<ol>
<li><a href="#overview">Overview</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#file-types">Supported File Types</a></li>
<li><a href="#building">Building</a></li>
<li><a href="#dependencies">Dependencies</a></li>
</ol>
</nav>
<!-- ================================================================ -->
<section id="overview">
<h2>1. Overview</h2>
<p>
A Code on the Go plugin for previewing Markdown and HTML files with
live rendering. Files can be selected from the project tree or
directly from device storage.
</p>
</section>
<!-- ================================================================ -->
<section id="features">
<h2>2. Features</h2>
<h3>Markdown preview</h3>
<p>Full support for Markdown:</p>
<ul>
<li>Headers, bold, italic, strikethrough</li>
<li>Code blocks with syntax-highlighting styles</li>
<li>Tables and task lists</li>
<li>Links and images</li>
<li>Blockquotes</li>
</ul>
<h3>HTML preview</h3>
<p>Direct rendering of HTML files:</p>
<ul>
<li>Automatic dark-mode support</li>
<li>Responsive layout</li>
</ul>
<h3>File selection</h3>
<ul>
<li>Select from the project file tree</li>
<li>Select from device storage (SD card, downloads, etc.)</li>
<li>Context-menu integration for supported files</li>
</ul>
</section>
<!-- ================================================================ -->
<section id="file-types">
<h2>3. Supported File Types</h2>
<table>
<thead>
<tr><th>Format</th><th>Extensions</th></tr>
</thead>
<tbody>
<tr>
<td>Markdown</td>
<td><code>.md</code>, <code>.markdown</code>, <code>.mdown</code>, <code>.mkd</code>, <code>.mkdn</code></td>
</tr>
<tr>
<td>HTML</td>
<td><code>.html</code>, <code>.htm</code>, <code>.xhtml</code></td>
</tr>
</tbody>
</table>
</section>
<!-- ================================================================ -->
<section id="building">
<h2>4. Building</h2>
<pre><code>cd markdown-previewer-plugin
# Build debug plugin
./gradlew assemblePluginDebug
# Build release plugin
./gradlew assemblePlugin</code></pre>
<p>Output:</p>
<table>
<thead>
<tr><th>Variant</th><th>Path</th></tr>
</thead>
<tbody>
<tr><td>Debug</td><td><code>build/plugin/markdown-previewer-debug.cgp</code></td></tr>
<tr><td>Release</td><td><code>build/plugin/markdown-previewer.cgp</code></td></tr>
</tbody>
</table>
<div class="callout">
<strong>Plugin permissions:</strong> <code>filesystem.read</code>
only — the plugin reads source files but never writes back.
</div>
</section>
<!-- ================================================================ -->
<section id="dependencies">
<h2>5. Dependencies</h2>
<table>
<thead>
<tr><th>Library</th><th>Purpose</th></tr>
</thead>
<tbody>
<tr><td>Markwon 4.6.2</td><td>Markdown rendering library</td></tr>
<tr><td>AndroidX WebKit</td><td>WebView enhancements</td></tr>
</tbody>
</table>
</section>
<footer>
Markdown Previewer Plugin Documentation · com.codeonthego.markdownpreviewer
</footer>
</body>
</html>