1.1.1 • Published 8 years ago

editor-widget v1.1.1

Weekly downloads
30
License
MIT
Repository
github
Last release
8 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

8 years ago

1.1.0

8 years ago

1.0.17

8 years ago

1.0.16

8 years ago

1.0.15

9 years ago

1.0.14

9 years ago

1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago