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
- Host: GitHub
- URL: https://github.com/cldwalker/repl.js
- Owner: cldwalker
- License: mit
- Created: 2010-10-18T08:10:37.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-12-06T00:39:27.000Z (over 15 years ago)
- Last Synced: 2025-10-20T09:50:31.472Z (8 months ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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