5 /* The console container element */
6 body { background-color: black; font-size: 16px; font-family: Courier; }
12 background-color:black;
14 /* The inner console element. */
20 background-color: gray;
22 /* The cursor color when the console looses focus. */
23 .jqconsole-blurred .jqconsole-cursor {
24 background-color: #666;
26 /* The current prompt text color */
30 /* The command history */
31 .jqconsole-old-prompt {
35 /* The text color when in input mode. */
39 /* Previously entered input. */
40 .jqconsole-old-input {
44 /* The text color of the output. */
55 <div id="console"></div>
56 <script src="test.js" type="text/javascript"></script>
57 <script src="jquery.js" type="text/javascript" charset="utf-8"></script>
58 <script src="jqconsole.min.js" type="text/javascript" charset="utf-8"></script>
61 var jqconsole = $('#console').jqconsole('Welcome to Lisptrack!\n', '> ');
62 jqconsole.RegisterMatching('(', ')', 'parents');
64 var startPrompt = function () {
65 // Start the prompt with history enabled.
66 jqconsole.Prompt(true, function (input) {
67 // Output input with the class jqconsole-output.
70 jqconsole.Write(JSON.stringify(lisp.evalString(input)) + '\n', 'jqconsole-output');
72 jqconsole.Write('ERROR: ' + error + '\n', 'jqconsole-error');
75 jqconsole.Write(JSON.stringify(lisp.compileString(input.slice(1))) + '\n', 'jqconsole-output');
77 // Restart the prompt.