Skip to content

Commit 974112f

Browse files
save file
1 parent 1d289fd commit 974112f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎utils/editors/html/code-explorer/v1.0/code-explorer-v1.0.html‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,13 @@
280280

281281
var txt = editor.getvalue();
282282
var list = parse.html(txt);
283+
284+
var colours = {
285+
head : 'darkslateblue',
286+
body : 'darkslateblue',
287+
script : 'firebrick',
288+
template : 'forestgreen',
289+
};
283290
console.log(list);
284291
view.replaceChildren();
285292

@@ -291,6 +298,9 @@
291298
$(node,'.indent').style.width = (o.indent*3)+'px';
292299
$(node,'.name').textContent = o.name;
293300

301+
if(colors[o.name]){
302+
node.style.color = colours[o.name];
303+
}
294304
if(o.name.includes('-')){
295305
node.style.color = 'hsl(33,100%,30%)';
296306
}

0 commit comments

Comments
 (0)