In the attached prompt.zip are two files: prompt.mlapp and prompt.html.
When you run prompt.mlapp, any "command" (here, any text you want) entered in the top box is echoed in the bottom box when you press Enter. Then, you can use the Up and Down arrow keys to scroll through past commands that you entered.
The quirk I am trying to fix: To see for yourself, enter a few commands. Press the Up arrow, and you will see the last command you entered. In a "normal" shell, if you just hit Enter at this point, the command displayed will be "rerun," and here that would mean it would appear again in the bottom text box. However, that doesn't happen. Instead, you have to press some key on the keyboard before the string is treated as new input, regardless of the cursor position, after which you can press Enter and have the new command "rerun."
(This is a pared-down version of a larger routine I've been working on. I plan on contributing the larger routine to File Exchange soon, but I'd like to fix this quirk first, if at all possible!)