While the page doesn't use js, it is there for you to use.
document.body.innerText += 'hello world/n';
document.body.innerText += 'hello world/n';
echo hello world >> file_in_notepad.txt
Although I'll admit that notepad's not as graceful about multiple programs editing files.