Skip to content

Commit 23136fc

Browse files
save file
1 parent 184a8a7 commit 23136fc

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

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

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
<input type=checkbox>
5353
persist
5454
</span>
55+
<span id=console-clear class=radio>
56+
clear
57+
</span>
5558

5659
<button id=kill style='margin-right:20px'>kill</button>
5760
</div>
@@ -148,6 +151,7 @@
148151
chk['console-show'] = $.chkbox(hdr,'#console-show',btn.show_console);
149152
chk['console-echo'] = $.chkbox(hdr,'#console-echo');
150153
chk['console-persist'] = $.chkbox(hdr,'#console-persist');
154+
$('#console-clear').onclick = btn.clear_console;
151155

152156
$(hdr,'#kill').onclick = btn.kill;
153157

@@ -182,6 +186,16 @@
182186
}//show_console
183187

184188

189+
btn.clear_console = function(){
190+
191+
webconsole.clear();
192+
if(chk['console-echo'].checked){
193+
console.clear();
194+
}
195+
196+
}//clear_console
197+
198+
185199
obj.glass = function(show=true){
186200

187201
var display = 'none';
@@ -238,7 +252,10 @@
238252
build.sandbox();
239253

240254
if(!chk['console-persist'].checked){
241-
console.clear();
255+
webconsole.clear();
256+
if(chk['console-echo'].checked){
257+
console.clear();
258+
}
242259
}
243260

244261
iframe.srcdoc = html;
@@ -251,8 +268,10 @@
251268
build.sandbox();
252269

253270
if(!chk['console-persist'].checked){
254-
console.clear();
255271
webconsole.clear();
272+
if(chk['console-echo'].checked){
273+
console.clear();
274+
}
256275
}
257276

258277
var echo = chk['console-echo'].checked;

0 commit comments

Comments
 (0)