For AI agents: the complete documentation index is available at /vue-codemirror6/llms.txt, the full documentation bundle is available at /vue-codemirror6/llms-full.txt, and this page is available as Markdown at /vue-codemirror6/index.md.
  • English
  • vue-codemirror6
    CodeMirror 6 for Vue

    A lightweight wrapper component that brings the CodeMirror 6 editor to Vue 2.7 and Vue 3.

    vue-codemirror6 logovue-codemirror6 logo
    💚

    Vue 2.7 & Vue 3

    Built on vue-demi, so the same component works in both Vue 2.7 and Vue 3 projects.

    🔁

    Two-way binding

    Bind the document with v-model just like a native input. External updates can keep the scroll position.

    🎨

    Languages, linters, and themes

    Pass any CodeMirror LanguageSupport, LintSource, or theme through props, or add raw extensions.

    🌐

    SSR ready

    CodeMirror is only initialized on the client, so the component renders safely in Nuxt and other SSR frameworks.

    🧩

    Web Component

    The same component is also exported as a custom element for use outside Vue.

    🛠️

    Full editor API

    Access the EditorView, selection, and CodeMirror 5 style helper methods through a template ref.