1.0.4 • Published 2 years ago

codemirror-elm v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Elm adapter for CodeMirror

Installation

With npm:

npm install --save codemirror-elm

With yarn:

yarn add codemirror-elm

Elm Configuration

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

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

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

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

Usage

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.

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago