File tree Expand file tree Collapse file tree 1 file changed +25
-5
lines changed
Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change 8080 width : 50% ;
8181 }
8282
83- .codemirror-container # run-button {
83+ .editor-actions {
84+ display : flex;
85+ justify-content : flex-end;
8486 align-self : flex-end;
85- width : 100px ;
87+ gap : 8px ;
88+ }
89+
90+ .editor-actions button {
8691 padding : 2px 4px ;
8792 border-radius : 4px ;
93+ width : 100px ;
8894 }
8995
9096 .tests-result-container {
141147 .challenge-main .tests-result-container {
142148 width : 100% ;
143149 }
150+
151+ .editor-actions {
152+ width : 100% ;
153+ }
144154 }
145155
146156 .CodeMirror {
187197 <!-- Code Editor Area -->
188198 < div class ="codemirror-container ">
189199 < div id ="editor "> </ div >
190- < button id ="run-button ">
191- ▶️ Run
192- </ button >
200+ < div class ="editor-actions ">
201+ < button id ="reset-button " class ="secondary ">
202+ Reset
203+ </ button >
204+ < button id ="run-button ">
205+ ▶️ Run
206+ </ button >
207+ </ div >
193208 </ div >
194209 <!-- Test Cases and Result Area -->
195210 < div class ="tests-result-container ">
258273 } ) ;
259274 } ;
260275
276+ let resetButton = document . getElementById ( 'reset-button' )
277+ resetButton . onclick = function ( ) {
278+ myCodeMirror . setValue ( code_under_test ) ;
279+ } ;
280+
261281 // If window size is > 800, expand the challenge list.
262282 function checkWidth ( ) {
263283 let detailsElement = document . getElementById ( 'challenge-list' ) ;
You can’t perform that action at this time.
0 commit comments