tty.js
tty.js copied to clipboard
Lightweight terminal
It would be nice to have an example without all the Windows and Tab stuff.
Just one terminal which fit his html container.
It would be easier to embed tty.js in a Web-App.
index.html is a nice presentation but it's a too complicated example.
Do you have some examples in this way ?
that would be awesome, +1
Good idea. I have some simple tests that benchmark the terminal inside the browser. That's pretty much all it is, just a single terminal on a single page. I've really been meaning to add it to the repo for a while.
I've also been thinking of moving static/term.js
to a separate repo, but at the same time, it is the heart and soul of tty.js, so it should probably stay.
I also think that client side and server side are too closed to separate them. I would be nice if you can push this small test.
I second this request, it would be nice to have a simple single terminal per chrome window.
totally agree that this would be great +1.
:+1:
I've been wanting this also - preferrably size-aware, so that it sizes the terminal to frame size... i.e. something like:
window.onresize = function () {
windowSize();
/* resize terminal code here */
}
function windowSize() {
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && (
document.documentElement.clientWidth ||
document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth ||
document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
}
@risacher, yeah, that's not a bad idea either. Maybe we could just make it full screen anyway.
Kind of a late announcement, but to everyone else who posted in this thread, there is an example available of a simple terminal: https://github.com/chjj/tty.js/tree/master/example
I want this also +1
:+1: Would be great to just open a page in a browser and start cracking away.
On a side note... It would also be nice to be able to place buttons below the window which act as "Macros"... Say a "build" button that just drops a command into the tty and runs it.