Example configuration for the CodeMirror code editor https://codemirror.net
  • TypeScript 100%
Find a file
2026-04-15 11:35:31 +02:00
src Explicitly mention keymaps in descriptions of basicSetup and minimalSetup 2026-02-19 08:40:23 +01:00
.gitignore Move to @codemirror/buildhelper 2021-03-09 17:47:10 +01:00
.npmignore Tell TypeScript to not go through dist to load the package itself 2020-12-29 16:52:02 +01:00
CHANGELOG.md Mark version 6.0.2 2025-06-19 13:48:21 +02:00
LICENSE Update maintainer email 2023-01-24 08:20:08 +01:00
package.json Update github links 2026-04-14 20:56:30 +02:00
README.md Update github links 2026-04-14 20:56:30 +02:00

codemirror NPM version

[ WEBSITE | DOCS | ISSUES | FORUM | CHANGELOG ]

This package provides an example configuration for the CodeMirror code editor. The actual editor is implemented in the various packages under the @codemirror scope, which this package depends on.

The project page has more information, a number of examples and the documentation.

This code is released under an MIT license.

We aim to be an inclusive, welcoming community. To make that explicit, we have a code of conduct that applies to communication around the project.

Usage

import {EditorView, basicSetup} from "codemirror"

const view = new EditorView({
  parent: document.body,
  doc: "Hello",
  extensions: [basicSetup /* ... */]
})

This sets up a basic code editor containing the word "Hello". You'll usually want to add at least a language mode to your configuration.