2

I am using Jquery terminal and it seems pretty cool. I've been looking around for several hours now, and I can't find a way to get the console to remain stationary when text is inputted.

Instead, the console increases in size for every line of input that I enter. Does anyone know how to keep a constant size for the terminal, is it a setting I missed or something? I want something like this.

Zack
  • 13,454
  • 24
  • 75
  • 113
  • http://terminal.jcubic.pl/#demo - it doesn't increase in the demo, or have I misunderstood you. – Ofir Baruch Jun 05 '15 at 16:56
  • that was the thing, I didn't WANT it to increase in my code, but it was. Fixed by adding a "height" option – Zack Jun 05 '15 at 17:00

1 Answers1

2

Add a height option:

Demo

$('#terminal').terminal(function(command, term) {
  if (command == 'test') {
    term.echo("you just typed 'test'");
  } else {
    term.echo('unknown command');
  }
}, {
  prompt: '> ',
  name: 'test',
  height: 200
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.37.1/css/jquery.terminal.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.37.1/js/jquery.terminal.min.js"></script>

<div id="terminal"></div>

On Jsfiddle: https://jsfiddle.net/user2314737/3mg40qtn/

user2314737
  • 27,088
  • 20
  • 102
  • 114