Get new jQuery plugins just once a week

×

Ptty

November 26, 2014

jQuery plugin for terminal emulation

Ptty is a jQuery plugin that creates an expansible terminal emulator with customizable options and callbacks.

Created by pachanka

Download

Example

ptty jQuery plugin

terminal


ptty.jquery.js

Ptty is a jQuery plugin that creates an expansible terminal emulator. It is small, it is fast and it is fully customizable by adding commands and callbacks.

Features

Ptty comes with a set of little helpers so to be as light and scalable as possible, It can:

Usage

To start Ptty simply do the following:

$(document).ready(function(){
    var $ptty = $('#terminal').Ptty();
});

Or you can use settings:

$(document).ready(function(){
    var $ptty = $('#terminal').Ptty({
        ps     : '$',
        theme  : 'boring',
        i18n   : {
            welcome: 'Welcome to the matrix.'
        }
    });
});

After initiation you can use methods like so:

$ptty.register('command', { 
    name : 'hello', 
    method : function(cmd){
        cmd.out = 'Hello World!';
        return cmd;
    } 
});

// Or:
$ptty.echo('Hello World!');

Demo & Docs

Please see the online documentation to learn about the plugin options and response structure or look at the Demo for a full screen example.

Ptty

Related posts:

Spectrum
flipClock
marginotes

To install using Bower
bower install Ptty

ptty jQuery plugin

http://jquer.in/wp-content/uploads/2014/09/ptty.jpg

jQuery plugin

Sign up for our weekly newsletter.

* We won't spam you ever