Type in the input. After each key is released, the complete current value is copied to the textarea.
const source = document.getElementById('t1');
const output = document.getElementById('t2');
source.addEventListener('keyup', () => {
output.value = source.value;
});