1818 < base href ='https://ext-code.com/html-components/list/web-editor/ '>
1919 < link rel =canonical href ='https://ext-code.com/html-components/list/web-editor/web-editor.html '>
2020
21- < meta >
21+ < meta name = viewport content =' width=device-width, initial-scale=1 ' >
2222 < link rel =icon href =''>
23-
23+
2424
2525 < script src ='https://ajaxorg.github.io/ace-builds/src-noconflict/ace.js '> </ script >
2626
5050
5151
5252 async function init ( ) {
53-
53+
5454 var menu = menumod ( ) ;
5555
5656 mod . base . add ( { ext, $, datatype, keydown, menu, menumod, ace} ) ;
5757
58-
58+
5959 hdr = mod [ 'html-components-hdr' ] ;
6060 log = mod [ 'log-mod' ] ;
6161
8585 mod . stack . add ;
8686
8787 ( { ext} = await import ( 'https://libs.ext-code.com/js/io/ext-loader/ext-loader.m.js' ) ) ;
88-
88+
8989 var promise = ext . load . libs (
9090 'js/dom/$.js' ,
9191 'js/core/datatype.js' ,
9494 'js/debug/debug.js' ,
9595 ) ;
9696 [ $ , datatype , menumod , keydown , debug ] = await promise ;
97-
97+
9898 mod . stack . complete ;
99-
99+
100100} ) ( ) ;
101101
102102 </ script >
103103
104104
105105 < style >
106-
106+
107107 html
108108 {font-family : arial}
109-
109+
110110 # latest
111111 {display : block;margin-top : 50px ;border : 1px solid blue;border-radius : 10px ;padding : 10px }
112112
115115
116116 code
117117 {display : block;white-space : pre;background : whitesmoke}
118-
119-
118+
119+
120120 th {
121121 text-align : left;margin-bottom : 10px
122- }
122+ }
123123td , th {
124124 padding : 5px 0px ;
125- }
125+ }
126126 </ style >
127127
128128 </ head >
129129
130130 < script >
131-
131+
132132 var data = { } ;
133133 data . readmd = `
134134# description
143143 < h2 class =title style ='top:10px '> web-editor</ h2 >
144144 < time slot =date datetime =2025-12-09 > 09 Dec 2025</ time >
145145 </ html-components-hdr >
146-
147-
146+
147+
148148 < h3 >
149149 Description
150150 </ h3 >
151-
151+
152152 < div class =description >
153153
154154 The web-editor component produces an editor in the webpage
155155
156156 </ div >
157-
157+
158158
159159 < h3 >
160160 Include
187187
188188 < div >
189189 < p >
190- the web-editor is setup as the main demo component and as such to simplify the demo's, all options within its
190+ the web-editor is setup as the main demo component and as such to simplify the demo's, all options within its
191191 initmod are optional
192192 </ p >
193193 < table >
@@ -266,13 +266,13 @@ <h3>
266266 on
267267 </ td >
268268 < td >
269- used for callbacks for different types of events, probably the most common one is
269+ used for callbacks for different types of events, probably the most common one is
270270 on.change, when the editors document changes the on.change callback is called,
271271 allowing the embedding module / document to respond to these events
272272 </ td >
273273 </ tr >
274274 </ table >
275-
275+
276276 </ div >
277277
278278
281281 {margin : 20px }
282282
283283 </ style >
284-
284+
285285 < section api >
286286 < h3 >
287287 API
315315 set the mode for the editor
316316 </ div >
317317 </ div >
318-
318+
319319 < div item >
320320 < div class =name >
321321 src
386386 </ div >
387387 </ div >
388388 </ section >
389-
390-
389+
390+
391391 < section >
392392 < h3 >
393393 Examples
@@ -399,11 +399,11 @@ <h3>
399399
400400 < section files >
401401 < style >
402-
402+
403403 [files ] [tabs ]
404404 {display : flex;text-align : center}
405405
406- [files ] [tabs ] div
406+ [files ] [tabs ] div
407407 {cursor : pointer;margin-bottom : 10px ;flex : 1 ;border : 1px solid lightgray;padding : 5px 10px }
408408
409409 </ style >
@@ -423,18 +423,18 @@ <h3>
423423 < script >
424424
425425 mod . stack . push ( ( ) => {
426-
426+
427427 var base = 'https://libs.ext-code.com/html/web-editor/' ;
428428 var get = url => fetch ( url ) . then ( res => res . text ( ) ) ;
429429
430430 $ . all ( '[files] [tabs] div' ) . forEach ( div => {
431-
431+
432432 div . onclick = async e => {
433-
433+
434434 var txt = div . textContent . trim ( ) ;
435435 var src ;
436436 switch ( txt ) {
437-
437+
438438 case 'latest' : src = 'web-editor.html' ; break ;
439439 case 'v2.0' : src = 'v2.0/web-editor-v2.0.html' ; break ;
440440
444444 editor . setValue ( txt ) ;
445445 editor . filename ( src ) ;
446446 editor . filename . save . hide ( ) ;
447-
448- } //onclick
447+
448+ } //onclick
449449
450450 } ) ;
451451
@@ -464,18 +464,18 @@ <h3>
464464
465465
466466 < script >
467-
467+
468468
469469 document . querySelectorAll ( 'code script' ) . forEach ( node => node . parentNode . textContent = node . textContent ) ;
470-
471-
470+
471+
472472 //:
473473
474474
475475 //:
476476
477477 function initdom ( ) {
478-
478+
479479 hdr . initdom ( ) ;
480480 log . initdom ( ) ;
481481
0 commit comments