const input = document.getElementById('input'); input.addEventListener('keydown', function(event) { if (event.key === 'Enter'){ convert_input(); } }) function convert_input() { const input = document.getElementById('input').value; const converted_input = input.replace(/ /g, ""); const box = document.getElementById('response_text'); box.textContent = converted_input; document.getElementById('input').value = ''; } function copy_to_clipboard() { const copyText = document.getElementById('response_text').textContent; console.log(copyText); navigator.clipboard.writeText(copyText); }