I found a JavaScript library called CodeMirror which provides a neat text input area specifically designed for writing code. It has line numbers and so on, and you can write a parser for styling different kinds of words which I might do if I have time.

This was one of the issues brought up in testing so I’m glad there’s a library for it. Today I also implemented a button that clears the canvas, and a sleep function! That’s big news because it means you can now animate things and program video games in Poki Nanpa. That was one of my “could have” goals that I wasn’t sure would be part of the final project.
Getting everything to update correctly between asynchronous functions was a pain, because I haven’t worked with them much before, but I feel like I have a better understanding now and I’m pleased with how it turned out.