11
22
3+ <!DOCTYPE html>
4+
35< html >
46
57 < head >
8+ < meta charset =utf-8 >
9+
10+ < title >
11+ HTML Editor
12+ </ title >
13+
14+ < meta name =description content ='Free online HTML editor with live preview and export to GitHub, cloud storage, or your local filesystem and many more '>
615
7- < title > html-editor</ title >
8- < meta name =description content ='Free online HTML editor with live preview and export to GitHub, cloud storage, or your local filesystem '>
9-
10- < base href ='https://javascript-2020.github.io/utils/editors/html-editor/ '>
11- < link rel =canonical href ='https://ext-code.com/utils/editors/html-editor/ '>
16+ < base href ='https://ext-code.com/utils/editors/html-editor/ '>
17+ < link rel =canonical href ='https://ext-code.com/utils/editors/html-editor/html-editor.html '>
1218
1319 < meta name =viewport content ='width=device-width, initial-scale=1 '>
1420 < link rel =icon type ='image/png ' href ='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAA81BMVEVHcEwdsVkes1rX3+LX3+LY3+PX3uMesFjY3uPO3dwfs1ses1uvvMYcslhWsHjI0tges1oes1sYg0Mes1q0wsupyMGsu8Wwvccfs1scpFNmp4SvvceuvMbY3uLH0diIt6AYf0LY3+O+ytGvvcceslnY3+OvvccntGBUv4Ifs1ses1oYgEMes1o4rmkYgEIWfkDY3+PR3d5gwosfs1scslkbslja3+QltWCJzKl3yJw+unJvxpZEvHc5uW5Ovn2Xz7Oe0bloxJGQzq/V3uHB2tLK3Nmx1seDy6S72M0yt2nT29+5xs4ttmak073H0Neq1MJUwIN+FK5WAAAAMHRSTlMABZmgCPdqRhW9P+v97gEDCzP47uUcCVbf9/6myVmts9Z7Z4Fnuzap59tfMGP+TXy36Sa+AAABb0lEQVQoz43Th07DMBAG4LILlC4KtGXvDV71yHZ2Stf7Pw2maaWMCvilxJE+ne07KZXKf9LYzKZR0Or1RjY3x3k+3wKZDDsn+frtPH+dPfzKtdOj1UzpnGu3x2WmwAsCADzFnZN6kaHvedz2IRhOJpOLaoFhJGCAHMGhOgDcFxhyFIIQ+SHisMx0bI0pcHWPOtaUltmXIoC6SwMh/TIDEMsoRiGMZAyym699fF7Obx6PHRlAxwc5fr1q9z06H4kfej/d53in3e4HsJjdo8Vc9nq9d1TK0+NdM60+xISQwSLpp3rjbmvBzGDE1CwppaElBBumwTDG+3spH2huMtAFckM+425iTXWukSw7M40LbNkJc2PXiYVt5HjquKEghj1iXHCdKx7kqi2T/3DCOGKjSDFjGebqbEkMPmLRbICF7tiRzpZ8yDR1c5OoBWsjgk3TQshacqurmsTzZ7GkeU77br6tr8xLOrVKfW1l6n//e991X2nBP19YTgAAAABJRU5ErkJggg== '>
1521
16-
1722 < script type ='application/ld+json '>
1823 {
1924 "@context" : "https://schema.org" ,
3843
3944 < script src ='https://libs.ext-code.com/js/dom/component/component.js '> </ script >
4045
46+
47+
48+
49+
4150 < script >
4251/*
4352 navigator.serviceWorker.register('/service-worker.js')
6675 } ) ;
6776
6877 </ script >
78+
79+
80+
81+
6982
7083 < script init >
7184 console . clear ( ) ;
7285 console . log ( 'html-editor-v2.0.html' ) ;
86+ console . log ( ) ;
7387 console . json = v => console . log ( JSON . stringify ( v , null , 4 ) ) ;
74- var version = 'v1.0' ;
88+ var df = true , version = 'v1.0'
89+ ;
7590
76- var df = true ;
77-
78-
79- var ext , $ , datatype , menumod , keydown
91+ var ace ;
92+
93+ var ext , $ , datatype , menumod , keydown , debug
8094 ;
8195
82- //mod.menu = {};
83- //mod.utils = {};
84-
8596
8697 var menu ;
8798
91102 var editor ;
92103 var output ;
93104 var log ;
94-
95-
96- var root ;
97-
98- var autosave ;
99105
100106
101-
102-
103- var slider = { } ;
104-
105- var ui = { } ;
106- ui . mode = 'vert' ;
107-
108-
109-
110- var btn = { } ;
111-
112-
113107 //:
114108
115109
116- mod . stack . add = init ;
117-
118110 async function init ( ) {
119111 debug ( 'init' , version ) ;
120112
121113 //keydown = keydown();
122114 menu = menumod ( ) ;
123115
124116
125- hdr = mod . hdr ;
126-
117+ hdr = mod [ 'editors-hdr' ] ;
127118 mainmenu = mod [ 'main-menu' ] ;
128- filemod = mod . filemod ;
129- publish = mod . publish ;
130- editor = mod . editor ;
131- output = mod . output ;
132- log = mod . log ;
119+ filemod = mod [ 'file-mod' ] ;
120+ publish = mod [ ' publish-ui' ] ;
121+ editor = mod [ 'web- editor' ] ;
122+ output = mod [ ' output-html' ] ;
123+ log = mod [ ' log-mod' ] ;
133124
134125 menu . initmod ( { keydown} ) ;
135126 mainmenu . initmod ( { ext, $, menu, editor, filemod} ) ;
140131 output . initmod ( { ext, $} ) ;
141132 log . initmod ( { ext, $} ) ;
142133
143- await mainmenu . init ( ) ;
144- await hdr . init ( ) ;
145- await filemod . init ( ) ;
146- await publish . init ( ) ;
147- await editor . init ( ) ;
148- await output . init ( ) ;
149- await log . init ( ) ;
150-
134+ await Promise . all ( [
135+ mainmenu . init ( ) ,
136+ hdr . init ( ) ,
137+ filemod . init ( ) ,
138+ publish . init ( ) ,
139+ editor . init ( ) ,
140+ output . init ( ) ,
141+ log . init ( ) ,
142+ ] ) ;
151143
144+ //:
152145
153146 window . onfocus = focus ;
154147 keydown . add ( kd ) ;
155148 menu . on . close = focus ;
156149
157150
158- await initdom ( document . body ) ;
151+ initdom ( document . body ) ;
159152
160153
161154
162155 } //init
163156
164-
165- //:
166-
167157
168158( async ( ) => {
169159
176166 'js/core/datatype.js' ,
177167 'js/dom/menumod/menumod.js' ,
178168 'js/dom/keydown/keydown.js' ,
169+ 'js/debug/debug.js' ,
179170 ) ;
180- [ $ , datatype , menumod , keydown ] = await promise ;
171+ [ $ , datatype , menumod , keydown , debug ] = await promise ;
181172
182173 mod . stack . complete ;
183174
225216 # view
226217 {display : none;flex : 1 }
227218
228- publish-root
219+ publish-ui
229220 {z-index : 1 ;position : relative}
230- editor-root
221+ web-editor
231222 {width : 50% }
232- output-root
223+
224+ output-html
233225 {flex : 1 }
234226
235227 button
247239 < body >
248240
249241
250- < hdr component =grp v2.0 >
242+ < editors- hdr component =grp >
251243 < img class =title src ='images/html-editor.png ' style ='top:-5px;height:55px ' alt ='html editor '>
252244 < h1 slot =seo-hdr class =visually-hidden > html editor</ h1 >
253- < span slot =date > 24 Aug 2025</ span >
254- </ hdr >
245+ < time slot =date datetime = 2025-10-30 > 30 Oct 2025</ time >
246+ </ editors- hdr>
255247
256248
257249 < div id =hdr >
258250
259- < main-menu component =page v2.0 > </ main-menu >
251+ < main-menu component =page > </ main-menu >
260252
261- < filemod component v2.0 > </ filemod >
253+ < file-mod component > </ file-mod >
262254
263255 < div id =save-root >
264256 < button id =save > save</ button >
@@ -270,7 +262,7 @@ <h1 slot=seo-hdr class=visually-hidden>html editor</h1>
270262 </ div >
271263 </ div >
272264
273- < publish component v2.0 > </ publish >
265+ < publish-ui component > </ publish-ui >
274266
275267 < button id =run > run</ button >
276268 < img id =prettier class =icon title =prettier >
@@ -284,26 +276,46 @@ <h1 slot=seo-hdr class=visually-hidden>html editor</h1>
284276
285277 < div id =view >
286278
287- < editor component v2.0 > </ editor >
279+ < web- editor component > </ web- editor>
288280
289281 < div id =page-slider style ='width:10px;cursor:ew-resize '> </ div >
290282
291- < output component =page v2.0 > </ output >
283+ < output-html component =page > </ output-html >
292284
293285 </ div >
294286
295287 < checkbox-one-template >
296288 < script src ='https://html-loader-1024713184986.us-central1.run.app/ '> </ script >
297289 </ checkbox-one-template >
298290
299- < log component v2.0 > </ log >
291+ < log-mod component > </ log-mod >
300292
301293 </ body >
302294
303295
304296 < script >
305297
306-
298+
299+ var root ;
300+
301+ var autosave ;
302+
303+
304+
305+
306+ var slider = { } ;
307+
308+ var ui = { } ;
309+ ui . mode = 'vert' ;
310+
311+
312+
313+ var btn = { } ;
314+
315+
316+ //:
317+
318+
307319 async function initdom ( rootnode ) { //c
308320 debug ( 'initdom' ) ;
309321 root = rootnode ;
@@ -499,8 +511,7 @@ <h1 slot=seo-hdr class=visually-hidden>html editor</h1>
499511
500512
501513 window . onmessage = function ( e ) {
502- console . log ( '[ html-editor ]' , 'window.onmessage' ) ;
503- console . log ( e ) ;
514+
504515
505516 var json = JSON . parse ( e . data ) ;
506517
@@ -509,11 +520,6 @@ <h1 slot=seo-hdr class=visually-hidden>html editor</h1>
509520 editor . setValue ( txt , - 1 ) ;
510521 }
511522
512- if ( json . autorun ) {
513- run ( ) ;
514- }
515-
516-
517523 } //onmessage
518524
519525
0 commit comments