Skip to content

Commit 4c1501f

Browse files
save file
1 parent cd0ae8c commit 4c1501f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

utils/editors/html-editor/v3.0/html-editor-v3.0.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,13 @@ <h4 slot=version>v3.0</h4>
266266

267267
menu.add.style();
268268

269+
var btn = document.createElement('input');
270+
btn.type = 'button';
271+
btn.value = 'isolate';
272+
$(hdr.__host.shadowRoot,'#btns').append(btn);
273+
btn.onclick = btn.isolate;
274+
275+
269276
$(root,'#save').onclick = btn.save;
270277
$('#run').onclick = btn.run;
271278
$(root,'#prettier').onclick = btn.prettier;
@@ -315,6 +322,20 @@ <h4 slot=version>v3.0</h4>
315322
}//keydown
316323

317324

325+
btn.isolate = function(){
326+
327+
var url = window.location.toString();
328+
var i1 = url.indexOf('?');
329+
if(i1!=-1){
330+
url = urls.lice(0,i1);
331+
}else{
332+
url += '?isolate';
333+
}
334+
window.location = url;
335+
336+
}//isolate
337+
338+
318339
btn.save = function(e){
319340

320341
filemod.save();

0 commit comments

Comments
 (0)