()
| 343 | // setting code |
| 344 | |
| 345 | function codeInput() |
| 346 | { |
| 347 | if (!checkboxLiveEdit.checked) |
| 348 | return; |
| 349 | |
| 350 | // debounce input - get content from code mirror if available, otherwise from textarea |
| 351 | clearTimeout(inputTimeout); |
| 352 | const code = codeMirror ? codeMirror.getValue() : textareaCode.value; |
| 353 | inputTimeout = setTimeout(()=> setCode(code), 500); |
| 354 | } |
| 355 | |
| 356 | function restartCode() |
| 357 | { |