An open API service indexing awesome lists of open source software.

https://github.com/cldwalker/repl.js

jquery plugin to replify an html element
https://github.com/cldwalker/repl.js

Last synced: about 1 month ago
JSON representation

jquery plugin to replify an html element

Awesome Lists containing this project

README

          

Description
===========
Jquery plugin which turns any input element into a repl(shell). Provides a basic javascript
repl by default. Goal is to mimic a commandline shell while providing html/js enhancements.

Setup
=====

Add css and javascript tags



Assuming you have an input tag with id #input (wrapped in a form of course):


$(document).ready( function(){ $('#input').repl() });

For options to pass to $.fn.repl(), see documentation in the source.

Features
========
* Prints executed commands and their outputs to a separate div while browser focus is kept on
repl prompt.
* Autoscrolls on long output to keep repl prompt visible (tested on Chrome only).
* Displays spinner while commands are executing (handy for long execution).

Demo
====
For a simple demo, simply open demo.html in a browser and try the basic javascript repl.
For a more advanced example, see jrepl.

Credits
=======
Original css and some js from [rkh's brirb](http://github.com/rkh/brirb).

Todo
====
* Toggle input to take multi-line inputs via textarea
* Embed in pages via a bookmarklet