Here are some tests. The first hides the textbox by setting the css opacity to 0, and draws the text with the text object.
dropbox.com/s/5xygyt0uo5zyz96/hidden_input_form.capx
Here's another test that uses spritefonts with variable widths. It supports single line text and lets you type with any character in the spritefont. Clicking sets the cursor position and you can remove charters with delete and backspace.
dropbox.com/s/4vww2hr0an2cdws/spritefont_input.capx
Taking the idea further to support highlighting, ctrl moving between words, copy/paste, double click selecting words, and multi lines just require a bit more work but seems possible.
Issues i encountered were the needing to get the keyboard input with js as mentioned above, and find() was case-insensitive, so I had to make a case sensitive one with a function.
Here's how the spritefont was generated:
construct.net/en/forum/game-development/tools-and-resources-27/spritefont-generator-168408