Skip to content

Commit 6316d62

Browse files
authored
Added option to disable Ace Editor 🔧
1 parent 89a69fb commit 6316d62

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/code-runner-wc.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,10 @@ function handleclick(codeRunner){
403403

404404

405405
let isAceLoadedAlready = false
406-
async function loadAceEditor(){
406+
async function loadAceEditor(){
407+
// any variable will disable all ace editors on page
408+
// example - let CodeRunner_DisableAceEditor= "true";
409+
if (typeof CodeRunner_DisableAceEditor == "undefined"){
407410
if(isAceLoadedAlready === false){
408411

409412
gfgScript.forEach(function(info) {
@@ -421,6 +424,8 @@ async function loadAceEditor(){
421424
} else{
422425
// Ace Editor has already been loaded to page
423426
}
427+
428+
}
424429
}
425430

426431

0 commit comments

Comments
 (0)