How to use the textarea function from blessed

Find comprehensive JavaScript blessed.textarea code examples handpicked from public code repositorys.

180
181
182
183
184
185
186
187
188
189
function isaText(x) {
    return (x[0] == ':');
}
let res = undefined;
if (isaText(name)) {
    res = blessed.textarea(obj);
    res.select = function() { /* do nothing */ };
} else if (isaBox(name)) {
    res = blessed.box(obj);
    res.select = function() { /* do nothing */ };
fork icon113
star icon0
watch icon2

10
11
12
13
14
15
16
17
18
19
layout = blessed.layout(styles.layout);

styles.textarea.parent = layout;
styles.menubar.parent  = layout;

textarea = blessed.textarea(styles.textarea);
menubar  = blessed.listbar(styles.menubar);

return {
  layout  : layout,
fork icon62
star icon0
watch icon3

+ 3 other calls in file

-1
fork icon24
star icon238
watch icon12

+ 7 other calls in file

49
50
51
52
53
54
55
56
57
58
  border: 'line',
  tags: true,
  label: 'console'
});

var codeBox = blessed.textarea({
  parent: screen,
  shadow: true,
  height: '40%',
  width: '100%',
fork icon8
star icon10
watch icon6

+ 9 other calls in file

26
27
28
29
30
31
32
33
34
35
    fg: 'white'
  }
});

// Input box
var messageInput = blessed.textarea({
  bottom: 0,
  left: 0,
  right: 0,
  height: 3,
fork icon6
star icon73
watch icon5

73
74
75
76
77
78
79
80
81
82
 * @return {Textarea}
 * @private
 */
Input.prototype._createNode = function(params) {
        params.style = params.style || {};
        var input = blessed.textarea({
                'parent': params.parent,
                'keys': true,
                'mouse': true,
                'bottom': params.bottom,
fork icon1
star icon18
watch icon3

+ 3 other calls in file

71
72
73
74
75
76
77
78
79
80
});


console.log(user);

var sshKey = blessed.textarea({
    parent: form,
    name: 'ssh_keys',
    value: user.inputData.ssh_keys === undefined ? user.keys[0] : user.inputData.ssh_keys,
    input: true,
fork icon5
star icon11
watch icon18

+ 2 other calls in file

182
183
184
185
186
187
188
189
190
191
			fg: 'white',
		},
	},
});

global.enterMessageBox = blessed.textarea({
	top: '85%',
	left: '15%',
	width: '85%',
	height: '17%',
fork icon1
star icon4
watch icon1

+ 125 other calls in file

89
90
91
92
93
94
95
96
97
98
});

//==============//
// Init Cmd Box //
//==============//
this.cmdBox = blessed.textarea({
  top: this.screen.height - 1,
  left: 'center',
  width: '100%',
  height: 1,
fork icon0
star icon3
watch icon1

+ 2 other calls in file

44
45
46
47
48
49
50
51
52
53
const list = this.grid.set(0, 1, 1, 1, blessed.list,
  { keys: true
  , fg: 'green'
  , label: `Hashes tagged: ${tag}`
  , columnWidth: [24, 10, 10]})
const textbox = blessed.textarea({
  parent: list,
  name: 'Details',
  keys: true,
  bottom: 0,
fork icon0
star icon2
watch icon0

241
242
243
244
245
246
247
248
249
250
   tags: true,
   border: { type: 'line' },
   style: { focus: { border: { fg: 'magenta' } } }
});

this.descriptionBox = blessed.textarea({
   label: 'Description',
   name: 'descriptionBox',

   top: 8,
fork icon0
star icon2
watch icon0

+ 5 other calls in file

298
299
300
301
302
303
304
305
306
307
  bottom: 0,
  height: 5,
  keys: true,
  style: theme.TEXT_STYLING
});
const taskText = blessed.textarea({
  parent: taskActions,
  top: 0,
  left: 0,
  height: 3,
fork icon1
star icon1
watch icon0

+ 2 other calls in file

114
115
116
117
118
119
120
121
122
123
    height: '100%',
    width: '100%',
    hidden: true
});

this.output = blessed.textarea({
    parent: this.chatBox,
    tags: true,
    border: {
        type: 'line'
fork icon0
star icon1
watch icon0

220
221
222
223
224
225
226
227
228
229
230
  bottom: 0,
  right: 0,
  top: 0
})


var irctextarea = blessed.textarea({
  title: 'irctextarea',
  parent: ircinput,
  inputOnFocus: true,
  padding: 0,
fork icon3
star icon0
watch icon0

162
163
164
165
166
167
168
169
170
171
172
    style: {
        bg: 'magenta'
    }
});


var input_1 = blessed.textarea({
    parent: form_1,
    top: '5%',
    left: '5%',
    width: '50%',
fork icon0
star icon0
watch icon1

+ 7 other calls in file

438
439
440
441
442
443
444
445
446
447
        fg: 'brightcyan',
        bg: 'black',
    },
});

const argsPrompt = blessed.textarea({
    debug: this.panel.debug,
    screen,
    parent: argsContainer,
    inputOnFocus: false,
fork icon0
star icon0
watch icon1

120
121
122
123
124
125
126
127
128
129
  parent: screen,
  content: 'Your comments...',
  top: 24,
  left: 5
});
var textarea = blessed.textarea({
  parent: form,
  name: 'comments',
  top: 26,
  left: 5,
fork icon0
star icon0
watch icon0

+ 12 other calls in file

98
99
100
101
102
103
104
105
106
107
108
            fg: '#f0f0f0'
        },
    }
});


const input = blessed.textarea({
    label: 'Write stuff',
    bottom: 0,
    left: 0,
    width: '80%',
fork icon0
star icon0
watch icon0

40
41
42
43
44
45
46
47
48
49
  bottom: 5,
  style: {
    bg: 'blue'
  }
});
this.name = blessed.textarea({
  parent: this.widget,
  left: 'center',
  height: 1,
  top: 13,
fork icon0
star icon0
watch icon0