Skip to content

Commit eea050f

Browse files
save file
1 parent d15c20a commit eea050f

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

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

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<template shadowrootmode=open>
66

77
<link rel=stylesheet href='css/github-markdown-light.css'>
8+
89
<style>
910

1011
#output {height:100%;border:2px solid lightgray;box-sizing:border-box;padding:10px}
@@ -23,39 +24,39 @@
2324
var obj = {
2425
version : 'v2.0',
2526
};
26-
27+
2728
var $
2829
;
2930

3031
obj.initmod = function(params){
31-
32+
3233
$ = params.$;
3334

3435
}//initmod
35-
36+
3637

3738
//vars:-
38-
39+
3940
var md;
4041

4142
var shadow;
4243

4344
var output;
44-
45+
4546

4647
//:
47-
48+
4849

4950
obj.init = async function(){
50-
51+
5152
await libs();
5253

5354
}//init
54-
55-
56-
55+
56+
57+
5758
function libs(){
58-
59+
5960
var resolve,promise=new Promise(res=>resolve=res);
6061

6162
var script = document.createElement('script');
@@ -67,62 +68,62 @@
6768

6869

6970
function onload(){
70-
71+
7172
md = markdownit();
7273
resolve();
7374

7475
}//onload
7576

7677
}//libs
77-
78+
7879

7980
//:
80-
81+
8182

8283
obj.initdom = function(rootnode){
8384

8485
shadow = host.shadowRoot;
8586

8687
output = $(shadow,'#output');
87-
88+
8889

8990
}//initdom
90-
91-
92-
//:
93-
9491

9592

93+
//:
94+
95+
96+
9697
obj.display = async function(txt){
97-
98+
9899
await libs;
99100

100101
var html = md.render(txt);
101102
output.innerHTML = html;
102103

103104
}//show
104-
105-
105+
106+
106107
obj.horiz = function(){
107-
108+
108109
host.style.width = '100%';
109110
host.style.height = '50%';
110-
111+
111112
}//horiz
112113

113114

114115
obj.vert = function(){
115-
116+
116117
host.style.width = '50%';
117118
host.style.height = '100%';
118119

119120
}//vert
120-
121+
121122

122123
return obj;
123124

124125
})//output_md
125-
126+
126127
</script>
127128

128129
</output-md>

0 commit comments

Comments
 (0)