|
12 | 12 | </title> |
13 | 13 |
|
14 | 14 | <meta name=description content='Use this tool to easily encode and decode text to and from HTML entities. Perfect for escaping special characters, preserving formatting, and ensuring safe rendering in web pages and emails.'> |
15 | | - <link rel=icon type='image/png' href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAAUVBMVEVHcEwBv/4Bv/0avvMCv/0TvvcCv/0Kv/oOvvgHv/sIvvsQvvcHv/sFv/xIvOEIv/sKvvoDv/wIvvoGv/sMv/kCv/0Dv/0Ev/wFv/wGv/sAv/7CmpJ5AAAAGnRSTlMA+fII1hDpQyJ7TxhylAFnN79dhC7hzLapoVwT8hEAAAE8SURBVCjPvVJZbsUgDCRhC2uA7Nz/oB3Da5uqeV+VihQpYhaPjRn7+5Gp+Nm6ZzDaPNZaB+H5E2wJbGeJD84ZwOEDSGr9DU+q1h11A/wt2M7Jm0kkOKPqAlgzZoTIEwG8k/hR62hZEt0ErDHBxB+XbnIN+XZtKA3vT9ggkGgubO7Rc2MjgppYPGuPwmI6B0KHi8gcfewSEtztuOBe0UgUmUG+4icQrYSF2iTaaFyz2HQrrW9dI3A1RDdIIAoSHrfZFhK1hNGTD4LdxL0B2QcQWkJzHymVVun7v54/ni1R5CNx7nRo7Ysi+TQxqa1N8eWochbtzenb82aYHYa6QO6O+nXEfL0enjK1oTFnmrCOu4Gn2cjAMwxVvLbL6eJ9ST3/hLXTUu4IGd8uJ812fr+7FsXW97AO4Xlv/+98ANkDGdLwxnVSAAAAAElFTkSuQmCC'> |
16 | | - <meta name=viewport content='width=device-width, initial-scale=1'> |
17 | 15 |
|
18 | 16 | <base href='https://ext-code.com/utils/misc/html-entities/'> |
19 | 17 | <link rel=canonical href='https://ext-code.com/utils/misc/html-entities/html-entities.html'> |
20 | | - |
| 18 | + |
| 19 | + <link rel=icon type='image/png' href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAAUVBMVEVHcEwBv/4Bv/0avvMCv/0TvvcCv/0Kv/oOvvgHv/sIvvsQvvcHv/sFv/xIvOEIv/sKvvoDv/wIvvoGv/sMv/kCv/0Dv/0Ev/wFv/wGv/sAv/7CmpJ5AAAAGnRSTlMA+fII1hDpQyJ7TxhylAFnN79dhC7hzLapoVwT8hEAAAE8SURBVCjPvVJZbsUgDCRhC2uA7Nz/oB3Da5uqeV+VihQpYhaPjRn7+5Gp+Nm6ZzDaPNZaB+H5E2wJbGeJD84ZwOEDSGr9DU+q1h11A/wt2M7Jm0kkOKPqAlgzZoTIEwG8k/hR62hZEt0ErDHBxB+XbnIN+XZtKA3vT9ggkGgubO7Rc2MjgppYPGuPwmI6B0KHi8gcfewSEtztuOBe0UgUmUG+4icQrYSF2iTaaFyz2HQrrW9dI3A1RDdIIAoSHrfZFhK1hNGTD4LdxL0B2QcQWkJzHymVVun7v54/ni1R5CNx7nRo7Ysi+TQxqa1N8eWochbtzenb82aYHYa6QO6O+nXEfL0enjK1oTFnmrCOu4Gn2cjAMwxVvLbL6eJ9ST3/hLXTUu4IGd8uJ812fr+7FsXW97AO4Xlv/+98ANkDGdLwxnVSAAAAAElFTkSuQmCC'> |
| 20 | + <meta name=viewport content='width=device-width, initial-scale=1'> |
21 | 21 |
|
22 | 22 | <script type='application/ld+json'> |
23 | 23 |
|
|
58 | 58 | var menumod; |
59 | 59 | var keydown; |
60 | 60 |
|
| 61 | + var hdr; |
61 | 62 | var filemod; |
62 | 63 | var editor = {}; |
63 | 64 | editor.source = null; |
|
76 | 77 | async function init(){ |
77 | 78 |
|
78 | 79 | //keydown = keydown(); |
79 | | - menu = mod.menumod(); |
| 80 | + menu = menumod(); |
80 | 81 |
|
81 | | - filemod = mod.filemod; |
82 | | - editor.source = mod['editor[source]']; |
83 | | - editor.output = mod['editor[output]']; |
84 | | - log = mod.log; |
| 82 | + hdr = mod['misc-hdr']; |
| 83 | + filemod = mod['file-mod']; |
| 84 | + editor.source = mod.source; |
| 85 | + editor.output = mod.output; |
| 86 | + log = mod['log-mod']; |
85 | 87 |
|
| 88 | + hdr.initmod({ext,$}); |
86 | 89 | filemod.initmod({ext,$,menumod,menu,complete,source,focus,log}); |
87 | 90 | editor.source.initmod({ext,$,menumod,menu}); |
88 | 91 | editor.output.initmod({ext,$,menumod,menu}); |
89 | 92 | log.initmod({ext,$}); |
90 | 93 |
|
91 | | - await filemod.init(); |
92 | | - await editor.source.init(); |
93 | | - await editor.output.init(); |
94 | | - await log.init(); |
| 94 | + await Promise.all([ |
| 95 | + hdr.init(), |
| 96 | + filemod.init(), |
| 97 | + editor.source.init(), |
| 98 | + editor.output.init(), |
| 99 | + log.init(), |
| 100 | + ]); |
95 | 101 |
|
96 | 102 | //: |
97 | 103 |
|
|
100 | 106 | menu.on.close = focus; |
101 | 107 |
|
102 | 108 |
|
103 | | - await initdom(document.body); |
| 109 | + initdom(document.body); |
104 | 110 |
|
105 | 111 |
|
106 | 112 | }//init |
|
199 | 205 | #view |
200 | 206 | {flex:1;display:flex;gap:10px;width:100%} |
201 | 207 |
|
202 | | - editor-root |
| 208 | + web-editor |
203 | 209 | {flex:1} |
204 | 210 |
|
205 | 211 |
|
|
212 | 218 |
|
213 | 219 | <div id=center> |
214 | 220 |
|
215 | | - <hdr component=grp v2.0> |
| 221 | + <misc-hdr component=grp> |
216 | 222 | <img class=title src='images/html-entities.png' style='top:-20px;height:80px' alt=html-entities> |
217 | | - <time slot=date datetime=2025-10-23>23 Oct 2025</time> |
218 | | - </hdr> |
| 223 | + <time slot=date datetime=2025-10-31>31 Oct 2025</time> |
| 224 | + </misc-hdr> |
219 | 225 |
|
220 | 226 |
|
221 | 227 |
|
222 | 228 |
|
223 | 229 | <div id=hdr> |
224 | | - |
225 | | - <filemod component v2.0></filemod> |
| 230 | + <file-mod component></file-mod> |
226 | 231 | <input value=encode type=button> |
227 | 232 | <input value=decode type=button> |
228 | | - |
229 | 233 | </div> |
230 | 234 |
|
231 | 235 | </div center> |
232 | 236 |
|
233 | 237 |
|
234 | 238 | <div id=view> |
235 | | - |
236 | | - <editor id=source component v2.0></editor> |
237 | | - <editor id=output component v2.0></editor> |
238 | | - |
| 239 | + <web-editor id=source component v2.0></web-editor> |
| 240 | + <web-editor id=output component v2.0></web-editor> |
239 | 241 | </div> |
240 | 242 |
|
241 | 243 |
|
242 | | - <log component v2.0></log> |
| 244 | + <log-mod component></log-mod> |
243 | 245 |
|
244 | 246 |
|
245 | 247 | </body> |
|
257 | 259 | //: |
258 | 260 |
|
259 | 261 |
|
260 | | - async function initdom(rootnode){ |
| 262 | + function initdom(rootnode){ |
261 | 263 |
|
262 | 264 | root = rootnode; |
263 | 265 |
|
|
272 | 274 |
|
273 | 275 | var view = $(root,'#view'); |
274 | 276 |
|
275 | | - await editor.source.initdom({mode:'text'}); |
276 | | - await editor.output.initdom({mode:'text'}); |
| 277 | + editor.source.initdom({mode:'text'}); |
| 278 | + editor.output.initdom({mode:'text'}); |
277 | 279 |
|
278 | 280 |
|
279 | 281 | log.initdom(); |
|
0 commit comments