@scalar/use-codemirror
CodeMirror for Vue
8,135,775
16,327
| Install | |
|---|---|
npm install @scalar/use-codemirror |
|
| Latest Version: | 0.14.16 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Oct 27, 2026 |
| Links: | GitHub · npm |
Maintainer: cameronrohani
CodeMirror Hook for Vue
Scalar is an open-source API platform for teams who want beautiful developer interfaces without vendor lock-in.
- API References — Interactive API documentation from OpenAPI and AsyncAPI specs.
- Developer Docs — Write in Markdown/MDX, generate API references, sync with two-way Git.
- SDK Generator — Type-safe SDKs and CLIs in TypeScript, Python, Go, PHP, Java, and Ruby.
- API Client — Open-source, offline-first Postman alternative built on OpenAPI.
20M+ monthly npm installs · 15,500+ GitHub stars · MIT licensed · scalar.com
Installation
npm install @scalar/use-codemirror
Usage
<script setup>
import { useCodeMirror } from '@scalar/use-codemirror'
import { ref } from 'vue'
const editor = ref(null)
const { codeMirror, setCodeMirrorContent } = useCodeMirror({
codeMirrorRef: editor,
content: '{ "foo": "bar" }',
language: 'json',
lineNumbers: true,
onChange: (value) => {
console.log('Content changed:', value)
},
})
</script>
<template>
<div ref="editor" />
</template>
Community
We are API nerds. You too? Let's chat on Discord: https://discord.gg/scalar
License
The source code in this repository is licensed under MIT.
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.14.16 | ^3.5.44 | MIT | |
| 0.14.15 | ^3.5.40 | MIT | |
| 0.14.14 | ^3.5.30 | MIT | |
| 0.14.13 | ^3.5.30 | MIT | |
| 0.14.12 | ^3.5.30 | MIT | |
| 0.14.11 | ^3.5.30 | MIT | |
| 0.14.10 | ^3.5.26 | MIT | |
| 0.14.9 | ^3.5.26 | MIT | |
| 0.14.8 | ^3.5.26 | MIT | |
| 0.14.7 | ^3.5.26 | MIT | |
| 0.14.6 | ^3.5.26 | MIT | |
| 0.14.5 | ^3.5.26 | MIT | |
| 0.14.4 | ^3.5.26 | MIT | |
| 0.14.3 | ^3.5.26 | MIT | |
| 0.14.2 | ^3.5.26 | MIT | |
| 0.14.1 | ^3.5.26 | MIT | |
| 0.14.0 | ^3.5.26 | MIT | |
| 0.13.50 | ^3.5.26 | MIT | |
| 0.13.49 | ^3.5.26 | MIT | |
| 0.13.48 | ^3.5.26 | MIT | |
| 0.13.47 | ^3.5.26 | MIT | |
| 0.13.45 | ^3.5.26 | MIT | |
| 0.13.44 | ^3.5.26 | MIT | |
| 0.13.43 | ^3.5.26 | MIT | |
| 0.13.42 | ^3.5.26 | MIT | |
| 0.13.39 | ^3.5.26 | MIT | |
| 0.13.37 | ^3.5.26 | MIT | |
| 0.13.36 | ^3.5.26 | MIT | |
| 0.13.35 | ^3.5.26 | MIT | |
| 0.13.34 | ^3.5.26 | MIT |
Showing the latest 30 of 262. See every release on npm