neo-blessed/test/widget-textarea.js

29 lines
446 B
JavaScript
Raw Normal View History

2013-07-18 22:56:05 +00:00
var blessed = require('../');
2013-07-18 22:56:05 +00:00
var screen = blessed.screen();
var box = blessed.textarea({
parent: screen,
// Possibly support:
// align: 'center',
bg: 'blue',
height: 'half',
width: 'half',
top: 'center',
left: 'center'
});
screen.render();
screen.key('q', function() {
process.exit(0);
});
screen.key('i', function() {
box.readInput(function() {});
});
screen.key('e', function() {
box.readEditor(function() {});
});