Enable console in div

How to enable a preview the console in a div?

I don’t know what that means, and it doesn’t really sound like a CodeMirror-related issue.