Reference

API

Exports of comark-codemirror.

comark-codemirror

Export
comark(options)the extension
definePlugin, defineComponents, resolvePluginsplugin and manifest helpers
resolveConfig, configOf(state), comarkConfigthe resolved configuration (a facet)
comarkLanguage, comarkMarkdown, comarkHighlight, comarkHighlightStyle, comarkTags, comarkThemelanguage, highlighting, theme
resolveContext(state, pos)the cursor context
complete(state, pos), collect, comarkCompletionSource, breadcrumbthe completion engine
chainBackCommand, chainStepsthe chain (← back)
docIndex(state), outline(doc), slugify, parseAttributes, scanAttributes, formatAttributes, parseYamlthe document index and parsers
scopesAt, shapeAt, shapeOf, shapeFromSchemabinding roots and shapes
diagnose(state), hoverAt(state, pos)lint and hover as data
toggleMark, setHeading, toggleList, toggleTask, toggleQuote, insertLink, insertComponent, wrapComponent, unwrapComponent, setProps, propsToYaml, setFrontmatter, formatTableedits: (state, …) → Edit
comarkCommands, comarkKeymap, toCommandCodeMirror commands and keymap

comark-codemirror/agent

complete, snapshot, llms, resolveTarget, replace, edit, patch, setText, runCommand, commandsOf, coreCommands, tools, TARGET_SCHEMA. See Agents.

comark-codemirror/vite

comarkCodemirrorComponents(options) (default export), scanComponents, extractComponent, VIRTUAL_ID. See Vite plugin.

comark-codemirror/plugins/*, comark-codemirror/presets/*

One default export per plugin; presetBuiltins() and presetEcosystem().

Copyright © 2026