Skip to content

Commit a3e0d28

Browse files
save file
1 parent 5af5529 commit a3e0d28

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

utils/editors/html-editor/html-editor.html

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"applicationCategory" : "DeveloperApplication",
3636
"operatingSystem" : "All",
3737
"browserRequirements" : "Requires JavaScript-enabled browser",
38-
"softwareVersion" : "1.0.0",
38+
"softwareVersion" : "2.0.0",
3939
"offers" : {"@type":"Offer","price":"0","priceCurrency":"GBP"}
4040
}
4141
</script>
@@ -48,7 +48,7 @@
4848
<meta property=og:url content='https://ext-code.com/utils/editors/html-editor/html-editor.html'>
4949
<meta property=og:type content=website>
5050
<meta property=og:site_name content=ext-code.com>
51-
51+
<!--https://www.opengraph.xyz/-->
5252

5353
<script src='https://cdn.jsdelivr.net/npm/ace-builds@1.37.0/src-min-noconflict/ace.js'></script>
5454
<script src='https://cdn.jsdelivr.net/npm/prettier@2.8.8/standalone.js'></script>
@@ -367,7 +367,6 @@ <h1 slot=seo-hdr class=visually-hidden>html editor</h1>
367367
$(root,'#save').onclick = btn.save;
368368

369369

370-
publish.initdom();
371370

372371
$('#run').onclick = run;
373372
$(root,'#prettier').onclick = btn.prettier;
@@ -393,6 +392,7 @@ <h1 slot=seo-hdr class=visually-hidden>html editor</h1>
393392
mainmenu.initdom(root),
394393
filemod.initdom(),
395394
autosave.initdom(),
395+
publish.initdom(),
396396
output.initdom(root),
397397
log.initdom(),
398398
editor.initdom(view,{mode:'html'}),
@@ -649,15 +649,16 @@ <h1 slot=seo-hdr class=visually-hidden>html editor</h1>
649649

650650

651651
function run(){
652-
653-
var html = editor.getValue();
654-
output.srcdoc(html);
655-
652+
debug('run');
656653
if(autosave.checked){
657-
console.log('save');
654+
debug('autosave');
658655
filemod.save();
659656
}
660657

658+
var html = editor.getValue();
659+
output.srcdoc(html);
660+
661+
661662
}//run
662663

663664

@@ -681,6 +682,20 @@ <h1 slot=seo-hdr class=visually-hidden>html editor</h1>
681682
//:
682683

683684

685+
function debug(...args){
686+
687+
if(!df && !obj.df)return;
688+
args.unshift(`[ ${did} ]`);
689+
var fmt = Array.from({length:args.length}).fill('%O').join(' ');
690+
var args2 = [fmt].concat(args);
691+
console.groupCollapsed.apply(console,args2);
692+
console.trace();
693+
console.groupEnd();
694+
695+
}//debug
696+
697+
698+
/*
684699
function debug(){
685700
686701
if(!df)return;
@@ -716,9 +731,9 @@ <h1 slot=seo-hdr class=visually-hidden>html editor</h1>
716731
debug.log.apply(null,arguments);
717732
718733
}//trace
719-
720-
721-
734+
*/
735+
736+
722737
</script>
723738

724739

0 commit comments

Comments
 (0)