Skip to content

Commit 1a08541

Browse files
save file
1 parent 11a083f commit 1a08541

File tree

1 file changed

+63
-35
lines changed

1 file changed

+63
-35
lines changed

utils/editors/markdown-editor/v2.0/markdown-editor-v2.0.html

Lines changed: 63 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,44 @@
11

22

3+
<!DOCTYPE html>
4+
5+
36
<html>
47

58
<head>
6-
7-
<title>markdown-editor</title>
8-
<meta name=description content='Write and preview Markdown instantly in your browser. A clean, fast, and distraction-free editor built for developers, writers, and technical bloggers'>
9+
<meta charset=utf-8>
910

10-
<base href='https://ext-code.com/utils/editors/markdown-editor/'>
11-
<base href='https://javascript-2020.github.io/utils/editors/markdown-editor/'>
11+
<title>
12+
Markdown Editor
13+
</title>
1214

15+
<meta name=description content='Write and preview Markdown instantly in your browser. A clean, fast, and distraction-free editor built for developers, writers, and technical bloggers.'>
16+
17+
<base href='https://ext-code.com/utils/editors/markdown-editor/'>
1318
<link rel=canonical href='https://ext-code.com/utils/editors/markdown-editor/markdown-editor.html'>
1419

1520
<meta name=viewport content='width=device-width, initial-scale=1'>
1621
<link rel=icon type='image/png' href='images/markdown-editor-favicon.png'>
1722

23+
<script type='application/ld+json'>
24+
{
25+
"@context" : "https://schema.org",
26+
"@type" : "SoftwareApplication",
27+
"name" : "Markdown Editor",
28+
"url" : "https://ext-code.com/utils/editors/markdown-editor/markdown-editor.html",
29+
"author" : {"@type":"Person","name":"Matthew Richards"},
30+
"description" : "Write and preview Markdown instantly in your browser. A clean, fast, and distraction-free editor built for developers, writers, and technical bloggers",
31+
"applicationCategory" : "DeveloperApplication",
32+
"operatingSystem" : "All",
33+
"browserRequirements" : "Requires JavaScript-enabled browser",
34+
"softwareVersion" : "1.0.0",
35+
"offers" : {"@type":"Offer","price":"0","priceCurrency":"GBP"}
36+
}
37+
</script>
38+
39+
40+
<script src='https://cdn.jsdelivr.net/npm/ace-builds@1.37.0/src-min-noconflict/ace.js'></script>
41+
1842

1943
<script src='https://libs.ext-code.com/js/dom/component/component.js'></script>
2044

@@ -23,11 +47,17 @@
2347
console.log('markdown-editor-v2.0.html');
2448
console.log();
2549
console.json=v=>console.log(JSON.stringify(v,null,4));
50+
var df=true,version='v2.0'
51+
;
52+
53+
var ace;
54+
2655
var ext;
2756
var $;
2857
var datatype;
2958
var menumod;
3059
var keydown;
60+
var debug;
3161

3262
var menu;
3363

@@ -44,20 +74,18 @@
4474
//:
4575

4676

47-
mod.stack.add = init;
48-
4977
async function init(){
50-
console.log('init');
78+
debug('init',version);
5179
//keydown = keydown();
5280
menu = menumod();
5381

54-
hdr = mod.hdr;
82+
hdr = mod['editors-hdr'];
5583
mainmenu = mod['main-menu']
56-
filemod = mod.filemod;
57-
publish = mod.publish;
58-
editor = mod.editor;
84+
filemod = mod['file-mod'];
85+
publish = mod['publish-ui'];
86+
editor = mod['web-editor'];
5987
output = mod.output;
60-
log = mod.log;
88+
log = mod['log-mod'];
6189

6290
menu.initmod({keydown});
6391

@@ -69,13 +97,15 @@
6997
output.initmod({ext,$,editor});
7098
log.initmod({ext,$});
7199

72-
await hdr.init();
73-
await mainmenu.init();
74-
await filemod.init();
75-
await publish.init();
76-
await editor.init();
77-
await output.init();
78-
await log.init();
100+
await Promise.all([
101+
hdr.init(),
102+
mainmenu.init(),
103+
filemod.init(),
104+
publish.init(),
105+
editor.init(),
106+
output.init(),
107+
log.init(),
108+
]);
79109

80110

81111
//:
@@ -105,9 +135,10 @@
105135
'js/dom/$.js',
106136
'js/core/datatype.js',
107137
'js/dom/menumod/menumod.js',
108-
'js/dom/keydown/keydown.js'
138+
'js/dom/keydown/keydown.js',
139+
'js/debug/debug.js',
109140
);
110-
[$,datatype,menumod,keydown] = await promise;
141+
[$,datatype,menumod,keydown,debug] = await promise;
111142

112143
mod.stack.complete;
113144

@@ -156,7 +187,7 @@
156187
#view
157188
{display:none;flex:1}
158189

159-
editor-root
190+
web-editor
160191
{width:50%}
161192

162193
output-root
@@ -168,20 +199,21 @@
168199
</style>
169200

170201
</head>
202+
171203

172204
<body>
173205

174-
<hdr component=grp v2.0>
206+
<editors-hdr component=grp>
175207
<img class=title src='images/markdown-editor.png' style='top:-5px;height:55px'>
176-
<span slot=date>24 Aug 2025</span>
177-
</hdr>
208+
<time slot=date datetime=2025-10-31>31 Oct 2025</time>
209+
</editors-hdr>
178210

179211

180212
<div id=hdr>
181213

182-
<main-menu component=page v2.0></main-menu>
214+
<main-menu component=page></main-menu>
183215

184-
<filemod component v2.0></filemod>
216+
<file-mod component></file-mod>
185217

186218
<div id=save-root>
187219
<button id=save>save</button>
@@ -193,7 +225,7 @@
193225
</div>
194226
</div>
195227

196-
<publish component v2.0></publish>
228+
<publish-ui component></publish-ui>
197229

198230
<button id=run>run</button>
199231

@@ -206,7 +238,7 @@
206238

207239
<div id=view>
208240

209-
<editor component v2.0></editor>
241+
<web-editor component></web-editor>
210242

211243
<div id=page-slider style='width:10px;cursor:ew-resize'></div>
212244

@@ -215,7 +247,7 @@
215247
</div>
216248

217249

218-
<log component v2.0></log>
250+
<log-mod component v2.0></log-mod>
219251

220252

221253
<checkbox-one-template>
@@ -417,10 +449,6 @@
417449
editor.setValue(txt,-1);
418450
}
419451

420-
if(json.run){
421-
run();
422-
}
423-
424452

425453
}//onmessage
426454

0 commit comments

Comments
 (0)