1.1.1 • Published 10 years ago

editor-widget v1.1.1

Weekly downloads
30
License
MIT
Repository
github
Last release
10 years ago

editor-widget Build Status

Editor widget used by slap-editor/slap

Example

var blessed = require('blessed');
var Editor = require('editor-widget');

var filePath = './file.txt';

// Create a screen object.
var screen = blessed.screen({
  smartCSR: true
});

screen.title = 'my window title';

// Create editor object
var editor = new Editor({
  parent: screen,
  top: 0,
  left: 0,
  width: '100%',
  height: '100%'
});

editor.open(filePath);

// Save on Control-S.
screen.key(['C-s'], function(ch, key) {
  editor.save(filePath);
});

// Quit on Escape, q, or Control-C.
screen.key(['escape', 'q', 'C-c'], function(ch, key) {
  return process.exit(0);
});

// Render the screen.
screen.render();
1.1.1

10 years ago

1.1.0

10 years ago

1.0.17

10 years ago

1.0.16

10 years ago

1.0.15

10 years ago

1.0.14

10 years ago

1.0.13

10 years ago

1.0.12

10 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago