How do I force jquery terminal to remain the same size?

感情迁移 提交于 2019-12-11 03:27:37

问题


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.


回答1:


Add a height option:

JS

$('#terminal').terminal(function (command, term) {
    if (command == 'test') {
        term.echo("you just typed 'test'");
    } else {
        term.echo('unknown command');
    }
}, {
    prompt: '>',
    name: 'test',
    height: 200
});

Demo: http://jsfiddle.net/11o3spLd/



来源:https://stackoverflow.com/questions/30671720/how-do-i-force-jquery-terminal-to-remain-the-same-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!