# @developertheexplorer/editor

> Inquirer multiline editor prompt

Latest version **1.0.0** (published 2022-05-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @developertheexplorer/editor
pnpm add @developertheexplorer/editor
yarn add @developertheexplorer/editor
bun add @developertheexplorer/editor
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: esm support; no vulnerabilities; high maintenance score; popular repo.

Warnings: low downloads; no types.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-05-13 |
| First published | 2022-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21639 |
| Author | Simon Boudrias |
| Maintainers | developertheexplorer |
| Keywords | cli, prompt, command-line, input |

## Links

- npm: https://www.npmjs.com/package/@developertheexplorer/editor
- Repository: https://github.com/SBoudrias/Inquirer.js
- Homepage: https://github.com/SBoudrias/Inquirer.js/blob/master/packages/editor/README.md
- Issues: https://github.com/SBoudrias/Inquirer.js/issues
- npm.io page: https://npm.io/package/@developertheexplorer/editor

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^4.1.1
- [@inquirer/core](https://npm.io/package/@inquirer/core.md) ^0.2.0
- [external-editor](https://npm.io/package/external-editor.md) ^3.0.3

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-05-13

## README

# `@inquirer/editor`

Prompt that'll open the user preferred editor with default content and allow for a convenient multi-line input controlled through the command line.

# Installation

```sh
npm install @inquirer/editor

yarn add @inquirer/editor
```

# Usage

```js
import editor from '@inquirer/editor';

const answer = await editor({
  message: 'Enter a description'
});
```

## Options

| Property | Type      | Required | Description                    |
| -------- | --------- | -------- | ------------------------------ |
| message  | `string`  | yes      | The question to ask            |
| validate    | `string => boolean \| string \| Promise<string \| boolean>` | no       | On submit, validate the content. When returning a string, it'll be used as the error message displayed to the user. Note: returning a rejected promise, we'll assume a code error happened and crash. |
| postfix  | `string`  | no (default to `.txt`) | The postfix of the file being edited. Adding this will add color highlighting to the file content in most editors. |


# License

Copyright (c) 2022 Simon Boudrias (twitter: [@vaxilart](https://twitter.com/Vaxilart))
Licensed under the MIT license.

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