
	let { value, selectionStart, selectionEnd } = editor
	if (keyCode === 9) { // TAB = 9
		e.preventDefault()
		editor.value = value.slice(0, selectionStart) + "\t" + value.slice(selectionEnd);
		editor.setSelectionRange(selectionStart+1, selectionStart+1)
	}
	else if (event.ctrlKey && event.key === 'Enter') 
		run();
});

run_el.addEventListener("click", run)

document.getElementById('examples').addEventListener('change', (e) => {
	editor_el.value = examples[e.currentTarget.value]
	term_el.innerHTML = `Pres