• Version 6.0.1
  • Published
  • 17.8 kB
  • 7 dependencies
  • MIT license


npm i codemirror
yarn add codemirror
pnpm add codemirror


Basic configuration for the CodeMirror code editor



variable basicSetup

const basicSetup: Extension;
  • This is an extension value that just pulls together a number of extensions that you might want in a basic editor. It is meant as a convenient helper to quickly set up CodeMirror without installing and importing a lot of separate packages.

    Specifically, it includes...

    - [the default command bindings]( - [line numbers]( - [special character highlighting]( - [the undo history]( - [a fold gutter]( - [custom selection drawing]( - [drop cursor]( - [multiple selections](^allowMultipleSelections) - [reindentation on input]( - [the default highlight style]( (as fallback) - [bracket matching]( - [bracket closing]( - [autocompletion]( - [rectangular selection]( and [crosshair cursor]( - [active line highlighting]( - [active line gutter highlighting]( - [selection match highlighting]( - [search]( - [linting](

    (You'll probably want to add some language package to your setup too.)

    This extension does not allow customization. The idea is that, once you decide you want to configure your editor more precisely, you take this package's source (which is just a bunch of imports and an array literal), copy it into your own code, and adjust it as desired.

variable minimalSetup

const minimalSetup: Extension;
  • A minimal set of extensions to create a functional editor. Only includes [the default keymap](, [undo history](, [special character highlighting](, [custom selection drawing](, and [default highlight style](

Package Files (1)

Dependencies (7)

Dev Dependencies (1)

Peer Dependencies (0)

No peer dependencies.


To add a badge like this badgeto your package's README, use the codes available below.

You may also use to create a custom badge linking to

  • Markdown
  • HTML
    <a href=""><img src="" alt=""></a>