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/api/props.md.
  • English
  • Props

    Props are written in kebab-case in templates (tab-size) and camelCase in JavaScript (tabSize).

    Content

    PropTypeDefaultDescription
    model-valuestring | Text''The document. Use with v-model. (Not value.)
    placeholderstring | HTMLElementundefinedShown while the document is empty. See placeholder.
    tagstring'div'Tag name of the root element.

    Setup

    PropTypeDefaultDescription
    basicbooleanfalseEnables basicSetup.
    minimalbooleanfalseEnables minimalSetup. basic takes precedence.

    Editing

    PropTypeDefaultDescription
    readonlybooleanfalsePrevents changes but keeps the editor focusable. See readOnly.
    disabledbooleanfalseMakes the editor non-editable and non-focusable. Inverse of editable.
    wrapbooleanfalseEnables line wrapping.
    tabbooleanfalseIndents with the Tab key (indentWithTab).
    tab-sizenumberundefinedTab size.
    indent-unitstringundefinedIndentation unit.
    allow-multiple-selectionsbooleanfalseAllows multiple selections.
    line-separatorstringundefinedLine separator. \n when not set.
    keymapKeyBinding[][]Custom key bindings.

    Language and linting

    PropTypeDefaultDescription
    langLanguageSupportundefinedLanguage for syntax highlighting. See languages.
    linterLintSourceundefinedLint source, e.g. jsonParseLinter() or esLint(...).
    linter-configobject{}Linter config.
    force-lintingbooleanfalseRuns the linter right away. See forceLinting.
    gutterbooleanfalseShows the lint gutter. Requires linter.
    gutter-configobjectundefinedLint gutter config.

    Appearance

    PropTypeDefaultDescription
    darkbooleanfalseMarks the editor theme as dark.
    themeRecord<string, StyleSpec>{}Style spec passed to EditorView.theme.
    phrasesRecord<string, string>undefinedUI translations.

    Scrolling

    PropTypeDefaultDescription
    scroll-into-viewbooleantrueScrolls to the selection when modelValue is updated externally. See scrollIntoView.
    preserve-scroll-positionbooleanfalseKeeps the scroll position when modelValue is updated externally. See scrollSnapshot.

    Extensions

    PropTypeDefaultDescription
    extensionsExtension[][]Additional extensions, appended after the ones generated from props.