# codemirror-elm

> Elm adapter for codemirror

Latest version **1.0.4** (published 2022-01-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install codemirror-elm
pnpm add codemirror-elm
yarn add codemirror-elm
bun add codemirror-elm
```

## 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.0.4 |
| Published | 2022-01-15 |
| First published | 2022-01-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 243.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | balov_bohdan |
| Maintainers | balov_bohdan |
| Keywords | elm, codemirror, code, editor |

## Links

- npm: https://www.npmjs.com/package/codemirror-elm
- Repository: https://github.com/balovbohdan/codemirror-elm
- Issues: https://github.com/balovbohdan/codemirror-elm/issues
- npm.io page: https://npm.io/package/codemirror-elm

## Dependencies (4)

- [nanoid](https://npm.io/package/nanoid.md) ^3.1.30
- [core-js](https://npm.io/package/core-js.md) ^3.19.3
- [codemirror](https://npm.io/package/codemirror.md) ^5.64.0
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-01-15
- 1.0.3 — 2022-01-15
- 1.0.2 — 2022-01-15
- 1.0.1 — 2022-01-15
- 1.0.0 — 2022-01-15

## README

# Elm adapter for CodeMirror

## Installation

With `npm`:
```bash
npm install --save codemirror-elm
```

With `yarn`:
```bash
yarn add codemirror-elm
```

## Elm Configuration

Go to the `elm.json` file and update the `source-directories` field:

```json
{
  "source-directories": [
    "node_modules/codemirror-elm",
    // other sources
  ],
}
```

If you are using `webpack`, you also need to update the `entry` field:

```js
entry: [
  // other entries
  path.resolve(__dirname, 'node_modules/codemirror-elm'),
],
```

## Usage

```elm
import CodeMirror exposing (codemirror)

codemirror
  { value = "const foo = true;"
  , config =
      { theme = "material"
      , mode = "javascript"
      , lineNumbers = True
      , lineWrapping = True
      , readOnly = "nocursor"
      }
  }
```

See more details in the [CodeMirror docs](https://codemirror.net/).

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