# @thetrg/editor-widget

> Fork of the editor widget used by slap-editor.

Latest version **1.3.1** (published 2019-05-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @thetrg/editor-widget
pnpm add @thetrg/editor-widget
yarn add @thetrg/editor-widget
bun add @thetrg/editor-widget
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2019-05-22 |
| First published | 2019-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 118.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | The TRG |
| Maintainers | ronbravo |

## Links

- npm: https://www.npmjs.com/package/@thetrg/editor-widget
- Repository: https://github.com/thetrg/editor-widget
- Homepage: https://github.com/thetrg/editor-widget#readme
- Issues: https://github.com/thetrg/editor-widget/issues
- npm.io page: https://npm.io/package/@thetrg/editor-widget

## Dependencies (14)

- [rc](https://npm.io/package/rc.md) ^1.2.8
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [semver](https://npm.io/package/semver.md) ^6.0.0
- [blessed](https://npm.io/package/blessed.md) ^0.1.81
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.3
- [es6-set](https://npm.io/package/es6-set.md) ^0.1.5
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.4
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [copy-paste](https://npm.io/package/copy-paste.md) ^1.3.0
- [iconv-lite](https://npm.io/package/iconv-lite.md) ^0.4.24
- [highlight.js](https://npm.io/package/highlight.js.md) ^9.15.6
- [@thetrg/slap-util](https://npm.io/package/@thetrg/slap-util.md) ^1.8.0
- [@thetrg/base-widget](https://npm.io/package/@thetrg/base-widget.md) ^1.2.0
- [@thetrg/text-buffer](https://npm.io/package/@thetrg/text-buffer.md) ^13.16.3

## Recent versions

- 1.3.1 (latest) — 2019-05-22
- 1.2.1 — 2019-05-22

## README

# editor-widget
Editor widget forked from the [slap](https://github.com/slap-editor/slap) text editor. This is for maintenance.

## Example
```js
const blessed = require('blessed');
const Editor = require('editor-widget');

const screen = blessed.screen({smartCSR: true, title: "editor-widget example"});
const editor = new Editor({
  // normal blessed widget, use like you would any other blessed element
  parent: screen,
  top: 0,
  left: 0,
  width: '100%',
  height: '100%'
});

const filePath = './file.txt';
editor.open(filePath);
screen.key(['C-s'], (ch, key) => { editor.save(filePath); });

screen.key(['escape', 'q', 'C-c'], (ch, key) => { process.exit(0); });
screen.render();
```

## In use
Here are some projects that use editor-widget:

* [slap](https://github.com/slap-editor/slap)
* [derhuerst/js-playgrounds](https://github.com/derhuerst/js-playgrounds)

---
_Source: https://npm.io/package/@thetrg/editor-widget · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
