
Company News
Meet the Socket Team at RSAC and BSidesSF 2026
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.
@codemirror/state
Advanced tools
[ WEBSITE | DOCS | ISSUES | FORUM | CHANGELOG ]
This package implements the editor state data structures 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.
The Monaco Editor is the code editor that powers VS Code, offering rich IntelliSense, validation, and advanced editing features. Compared to @codemirror/state, Monaco is a more comprehensive solution that includes its own state management but is heavier and less modular.
Ace is another embeddable code editor offering a wide range of features and language support. While it also manages editor state and provides similar functionality, it is designed as a monolithic package, making it less flexible than the modular approach of CodeMirror.
Draft.js is a framework for building rich text editors in React, focusing on immutable content and state management. It differs from @codemirror/state by being React-specific and focusing more on rich text editing rather than code editing, but it shares the concept of managing editor state in a comprehensive way.
FAQs
Editor state data structures for the CodeMirror code editor
The npm package @codemirror/state receives a total of 3,747,993 weekly downloads. As such, @codemirror/state popularity was classified as popular.
We found that @codemirror/state demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.

Research
/Security News
Malicious Packagist packages disguised as Laravel utilities install an encrypted PHP RAT via Composer dependencies, enabling remote access and C2 callbacks.

Research
/Security News
OpenVSX releases of Aqua Trivy 1.8.12 and 1.8.13 contained injected natural-language prompts that abuse local AI coding agents for system inspection and potential data exfiltration.