Creating a text input inside of a KA project has been a huge issue for many users for a long time. Myself included. I created a small library for myself to use a few years back, but it was very incomplete. It didn't automatically scroll text, it didn't allow text selection, and you could only add/remove from the very end of the input, no inserting allowed. However, this new library is different. This library is completely feature-complete and will serve all the needs of every Khan Academy programmer far and wide, both in the webpage enviroment and the PJS environment.
More information can be found at these links:
- Home page for Canvas Text Input on KA
- Getting started with Canvas Text Input on KA
- Complete Canvas Text Input documentation for KA
I also have a version of this library for use off of KA, which can be found here, along with an entire page of info and a complete documentation.