5 /* The console container element */
6 body { background-color: black; font-size: 16px; font-family: Courier; overflow: hidden; padding: 0 0 0 0;}
13 background-color:black;
20 /* The inner console element. */
26 background-color: gray;
28 /* The cursor color when the console looses focus. */
29 .jqconsole-blurred .jqconsole-cursor {
30 background-color: #666;
32 /* The current prompt text color */
36 /* The command history */
37 .jqconsole-old-prompt {
41 /* The text color when in input mode. */
45 /* Previously entered input. */
46 .jqconsole-old-input {
50 /* The text color of the output. */
54 .jqconsole-return, .jqconsole-header {
64 <div id="console"></div>
65 <script src="ecmalisp.js" type="text/javascript"></script>
66 <script src="jquery.js" type="text/javascript" charset="utf-8"></script>
67 <script src="jqconsole.min.js" type="text/javascript" charset="utf-8"></script>
70 var jqconsole = $('#console').jqconsole('Welcome to Ecmalisp!\n\n', '> ');
71 jqconsole.RegisterMatching('(', ')', 'parents');
73 lisp.write = function(str){
74 jqconsole.Write(str, 'jqconsole-output');
78 var startPrompt = function () {
79 // Start the prompt with history enabled.
80 jqconsole.Prompt(true, function (input) {
81 // Output input with the class jqconsole-return.
84 jqconsole.Write(lisp.print(lisp.evalString(input)) + '\n', 'jqconsole-return');
86 jqconsole.Write('ERROR: ' + (error.message || error) + '\n', 'jqconsole-error');
89 jqconsole.Write(lisp.compileString(input.slice(1)) + '\n', 'jqconsole-return');
91 // Restart the prompt.
95 lisp.read(input[0]==','? input.slice(1): input);