You could run the contents of the editbox as JavaScript using the browser object's execjs action. That is the simplest but the feedback would basically just be a return value. I suppose you could add some functions that call c2 functions to provide more feedback. But arbitrarily running js is an issue since absolutely any js can be run, which can be an issue.
You can look at the browser and function objects in the manual to see what I talk about above.
A more advanced thing you could do is make your own parser that reads the editbox a character at a time to do your own coding language. This gives much more control or what can and can't be done by the user. This can be as complex or as simple as you like. Probably not easy if it's not something you've done before.
I've done some expression parsers before that you can find on the forum, but reading outside sources may be more useful.
I guess it depends on what you actually want the code to do specifically and look like specifically.