forked from sheep-realms/Echo-Live
-
Notifications
You must be signed in to change notification settings - Fork 0
/
editor.html
295 lines (274 loc) · 16.9 KB
/
editor.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
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Echo Live 编辑器</title>
<link rel="stylesheet" href="css/fh-ui.css">
<link rel="stylesheet" href="css/editor.css">
<script src="js/jquery-1.7.2.min.js"></script>
<script src="config.js"></script>
<script src="js/editor-constructor.js"></script>
</head>
<body>
<main>
<!-- 标签页标题 -->
<nav id="echo-editor-nav" class="tabpage-nav">
<button
class="tabpage-nav-item"
data-pageid="ptext"
role="tab"
aria-selected="true"
accesskey="1"
title="不包含任何样式的文本 [alt+1]"
>纯文本</button>
<button
class="tabpage-nav-item"
data-pageid="rtext"
role="tab"
aria-selected="false"
accesskey="2"
title="包含特殊样式的文本 [alt+2]"
>富文本</button>
<button
class="tabpage-nav-item"
data-pageid="config"
role="tab"
aria-selected="false"
accesskey="3"
title="编辑配置 [alt+3]"
>配置</button>
<button
id="tabpage-nav-output"
class="tabpage-nav-item"
data-pageid="output"
role="tab"
aria-selected="false"
accesskey="4"
title="输出代码 [alt+4]"
>输出</button>
</nav>
<!-- 标签页面板 -->
<div class="tabpage-centent">
<!-- 纯文本标签页 -->
<section class="tabpage-panel" role="tabpanel" data-pageid="ptext">
<h2 class="tabpage-panel-title">纯文本</h2>
<div class="echo-editor-from">
<label for="character">说话人</label>
<input type="text" name="character" id="ptext-character">
<label for="content">内容</label>
<textarea name="content" id="ptext-content" aria-label="纯文本内容编辑框"></textarea>
<div class="collapse">
<div class="collapse-title">
<button role="checkbox" aria-selected="false" class="checkbox collapse-checkbox">
<span class="icon"></span>
<span class="text">启动参数</span>
<input type="hidden" name="ptext-chk-more" id="ptext-chk-more" value="0">
</button>
</div>
<div class="collapse-content hide">
<div class="echo-editor-from-row">
<label for="print-speed">打印速度</label>
<input type="number" name="print-speed" id="ptext-ipt-print-speed" class="reset" value="30" data-default="30">
</div>
<div class="echo-editor-from-checkbox-list">
<span class="echo-editor-from-input-tip">每个打印循环的延迟时间(毫秒),默认为 30<span class="print-speed-change hide">,您的默认配置为 <span class="print-speed-config"></span></span>。数字越大,耗时越长。中日韩字符延迟 × 2。</span>
</div>
</div>
</div>
<div class="collapse">
<div class="collapse-title">
<button role="checkbox" aria-selected="false" class="checkbox collapse-checkbox">
<span class="icon"></span>
<span class="text">引用符号</span>
<input type="hidden" name="ptext-chk-quote" id="ptext-chk-quote" value="0">
</button>
</div>
<div class="collapse-content hide">
<div class="echo-editor-from-row">
<label for="quote-before">开头</label>
<input type="text" name="quote-before" id="ptext-ipt-quote-before" class="reset" value="「" data-default="「">
</div>
<div class="echo-editor-from-row">
<label for="quote-after">结尾</label>
<input type="text" name="quote-after" id="ptext-ipt-quote-after" class="reset" value="」" data-default="」">
</div>
<div class="echo-editor-from-checkbox-list">
<span class="echo-editor-from-input-tip">自动在每一句话开头和结尾添加引用符号,Echo Live 会为一些引用符号自动缩进。</span>
</div>
</div>
</div>
<div class="editor-controller-bottom fh-flex-row">
<button id="ptext-btn-clear" class="fh-button fh-big fh-danger">重置</button>
<button id="ptext-btn-submit" class="fh-button fh-big">输出</button>
</div>
</div>
</section>
<!-- 富文本标签页 -->
<section class="tabpage-panel hide" role="tabpanel" data-pageid="rtext">
<h2 class="tabpage-panel-title">富文本</h2>
<p style="color: red;">该页面正在施工中,暂不可用。</p>
<div class="echo-editor-from">
<label for="character">说话人</label>
<input type="text" name="character" id="ptext-character">
<div class="editor-text">
<div class="editor-text-item">
<label for="text">字段</label>
<div class="editor-text-title">
<span style="color: var(--text-regular);">正在编辑:<span class="editor-text-index-now">1</span></span>
<span>
<button id="rtext-btn-text-clear" class="fh-button fh-danger">清空</button>
<button id="rtext-btn-text-save" class="fh-button">暂存 →</button>
<input type="hidden" id="editor-text-index-now" name="editor-text-index-now" value="0">
</span>
</div>
<div class="editor-text-controller">
<button role="checkbox" aria-selected="false" class="checkbox">
<span class="icon"></span>
<span class="text">粗体</span>
<input type="hidden" name="editor-text-controller-bold" value="0">
</button>
<button role="checkbox" aria-selected="false" class="checkbox">
<span class="icon"></span>
<span class="text">斜体</span>
<input type="hidden" name="editor-text-controller-italic" value="0">
</button>
<button role="checkbox" aria-selected="false" class="checkbox">
<span class="icon"></span>
<span class="text">下划线</span>
<input type="hidden" name="editor-text-controller-underline" value="0">
</button>
<button role="checkbox" aria-selected="false" class="checkbox">
<span class="icon"></span>
<span class="text">颜色</span>
<input type="hidden" name="editor-text-controller-color" value="0">
</button>
<input type="text" name="" id="" style="width: 5.5em; text-align: center;" class="reset" value="#000000" data-default="#000000">
</div>
<textarea name="text" id="rtext-text" class="rtext-text" aria-label="字段编辑框"></textarea>
<div class="collapse">
<div class="collapse-title">
<button role="checkbox" aria-selected="false" class="checkbox collapse-checkbox">
<span class="icon"></span>
<span class="text">打字模拟</span>
<input type="hidden" name="rtext-chk-typewrite" id="rtext-chk-typewrite" value="0">
</button>
</div>
<div class="collapse-content hide">
<div class="echo-editor-from-row">
<label for="typewrite">被替换的内容</label>
<input type="text" name="typewrite" class="reset" value="" data-default="">
</div>
<div class="echo-editor-from-checkbox-list">
<span class="echo-editor-from-input-tip">例如:shu'ru'fa</span>
</div>
</div>
</div>
<div class="collapse">
<div class="collapse-title">
<button role="checkbox" aria-selected="false" class="checkbox collapse-checkbox">
<span class="icon"></span>
<span class="text">自定义样式</span>
<input type="hidden" name="rtext-chk-style" id="rtext-chk-style" value="0">
</button>
</div>
<div class="collapse-content hide">
<textarea name="style" id="rtext-style" class="rtext-style code" aria-label="CSS样式编辑框"></textarea>
<span class="echo-editor-from-input-tip">自定义内联 CSS 样式。</span>
<div class="echo-editor-from-row">
<label for="class">类</label>
<input type="text" name="class" class="reset" value="" data-default="">
</div>
<div class="echo-editor-from-checkbox-list">
<span class="echo-editor-from-input-tip">该字段的类属性,使用空格分隔。</span>
</div>
</div>
</div>
<div class="collapse">
<div class="collapse-title">
<button role="checkbox" aria-selected="false" class="checkbox collapse-checkbox">
<span class="icon"></span>
<span class="text">杂项</span>
<input type="hidden" name="rtext-chk-misc" id="rtext-chk-misc" value="0">
</button>
</div>
<div class="collapse-content hide">
<div class="echo-editor-from-row">
<label for="pause">完成后停顿</label>
<input type="number" name="pause" id="rtext-ipt-pause" class="reset" value="10" data-default="10">
</div>
<div class="echo-editor-from-checkbox-list">
<span class="echo-editor-from-input-tip">当前字段打印完毕后的停顿循环次数。</span>
</div>
</div>
</div>
</div>
<div class="editor-text-list">
<label>字段列表</label>
<div class="editor-text-list-content">
<div class="editor-text-list-item">
<span class="index">1.</span>
<span class="text"></span>
<span class="btn">
<button class="fh-button fh-small">编辑</button>
<button class="fh-button fh-small fh-danger">删除</button>
</span>
</div>
</div>
<button id="editor-text-list-add" class="fh-button fh-ghost fh-block">新增字段</button>
</div>
</div>
<div class="collapse">
<div class="collapse-title">
<button role="checkbox" aria-selected="false" class="checkbox collapse-checkbox">
<span class="icon"></span>
<span class="text">启动参数</span>
<input type="hidden" name="rtext-chk-more" id="rtext-chk-more" value="0">
</button>
</div>
<div class="collapse-content hide">
<div class="echo-editor-from-row">
<label for="print-speed">打印速度</label>
<input type="number" name="print-speed" id="rtext-ipt-print-speed" class="reset" value="30" data-default="30">
</div>
<div class="echo-editor-from-checkbox-list">
<span class="echo-editor-from-input-tip">每个打印循环的延迟时间(毫秒),默认为 30<span class="print-speed-change hide">,您的默认配置为 <span class="print-speed-config"></span></span>。数字越大,耗时越长。中日韩字符延迟 × 2。</span>
</div>
</div>
</div>
<div class="editor-controller-bottom fh-flex-row">
<button id="rtext-btn-clear" class="fh-button fh-big fh-danger">重置</button>
<button id="rtext-btn-submit" class="fh-button fh-big">输出</button>
</div>
</div>
</section>
<!-- 配置标签页 -->
<section class="tabpage-panel hide" role="tabpanel" data-pageid="config">
<h2 class="tabpage-panel-title">配置</h2>
<div class="echo-editor-from">
<label for="output-before">头部内容</label>
<textarea name="output-before" id="config-output-before" class="code">const data = </textarea>
<button role="checkbox" aria-selected="true" class="checkbox selected">
<span class="icon"></span>
<span class="text">在输出内容之前插入头部内容</span>
<input type="hidden" name="config-output-use-before" id="config-output-use-before" value="1">
</button>
</div>
<p style="color: var(--text-regular);">详细配置请见配置文件 <code>config.js</code>。</p>
</section>
<!-- 输出标签页 -->
<section class="tabpage-panel hide" role="tabpanel" data-pageid="output">
<h2 class="tabpage-panel-title">输出</h2>
<div class="echo-editor-from">
<label for="content">输出内容</label>
<textarea name="content" id="output-content" class="code" aria-label="输出内容编辑框"></textarea>
<div class="editor-controller-bottom fh-flex-row">
<button id="output-btn-clear" class="fh-button fh-big fh-danger">清空</button>
</div>
</div>
</section>
</div>
</main>
<script src="js/editor.js"></script>
</body>
</html>