neo-blessed/test/widget-nested-attr.js
Christopher Jeffrey 084f28fcff content attribute and tag handling.
- handle content attributes with better respect to element's style.
- add a more sophisticated tag parser.
2013-07-28 13:20:52 -05:00

29 lines
460 B
JavaScript

var blessed = require('../')
, screen;
screen = blessed.screen({
dump: __dirname + '/nested-attr.log',
smartCSR: true
});
blessed.box({
parent: screen,
left: 'center',
top: 'center',
width: '80%',
height: '80%',
bg: 'black',
fg: 'yellow',
tags: true,
border: {
type: 'ascii'
},
content: '{red-fg}hello {blue-fg}how{/blue-fg} are you?{/red-fg}'
});
screen.key('q', function() {
return process.exit(0);
});
screen.render();