New:Socket for Asana Is Now Available.Learn more
Get Started

@codemirror/view

Package Overview
Dependencies
Maintainers
1
Versions
256
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/view

DOM view component for the CodeMirror code editor

npmnpm
Version
6.43.10
Version published
Weekly downloads
11M
-30.25%
Maintainers
1
Weekly downloads
 
Created
Source

@codemirror/view NPM version

[ WEBSITE | DOCS | ISSUES | FORUM | CHANGELOG ]

This package implements the DOM view component for the CodeMirror code editor.

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} from "@codemirror/view"
import {basicSetup} from "codemirror"

const view = new EditorView({
  parent: document.querySelector("#some-node"),
  doc: "Content text",
  extensions: [basicSetup /* ... */]
})

Add additional extensions, such as a language mode, to configure the editor. Call view.dispatch to update the editor's state.

Keywords

editor

FAQs

Package last updated on 31 Aug 2026

Related posts