Skip to content

Commit 233fed2

Browse files
save file
1 parent 89cd654 commit 233fed2

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

html-components/list/web-editor/web-editor.html

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,18 @@
7373
linkTarget : '_blank',
7474
});
7575
md.use(markdownItAttrs,{leftDelimiter:'{',rightDelimiter:'}',allowedAttributes:['id','class',/^data-.*$/]});
76-
console.log(markdownitContainer);
76+
md.use(window.markdownitContainer,'api-function',{
77+
render(tokens,idx){
78+
79+
var token = tokens[idx];
80+
if(token.nesting===1){
81+
return '<div class=api-function>\n';
82+
}else{
83+
return '</div>\n';
84+
}
85+
86+
}
87+
});
7788

7889

7990
dirtree = mod['dir-tree'];
@@ -113,6 +124,14 @@
113124
<link rel=stylesheet href='../css/component.css' crossorigin=anonymous>
114125

115126
<style>
127+
128+
.api-function
129+
{}
130+
.api-function h3
131+
{}
132+
.api-function h4
133+
{}
134+
116135
</style>
117136

118137
</head>

0 commit comments

Comments
 (0)