Ace Editor: Lock or Readonly Code Segment That Comes After

I'm currently studying Ace Editor, and I would like to make a kind of Terminal or Console, I found this topic that is the way, but I'm still lost on how to block everything that comes back and only release from the symbol " : " to the user to type what they need, hit Enter and break the line and theoretically the code would be executed.

the topic in question is this, but unfortunately it doesn't solve my problem in question

does anyone know how I could do this kind of thing in Ace Editor with JS Vanilla in a not so complex way?

would like to have something like this or similar, using Ace-editor

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum