Reference
API
Exports of comark-codemirror.
comark-codemirror
| Export | |
|---|---|
comark(options) | the extension |
definePlugin, defineComponents, resolvePlugins | plugin and manifest helpers |
resolveConfig, configOf(state), comarkConfig | the resolved configuration (a facet) |
comarkLanguage, comarkMarkdown, comarkHighlight, comarkHighlightStyle, comarkTags, comarkTheme | language, highlighting, theme |
resolveContext(state, pos) | the cursor context |
complete(state, pos), collect, comarkCompletionSource, breadcrumb | the completion engine |
chainBackCommand, chainSteps | the chain (← back) |
docIndex(state), outline(doc), slugify, parseAttributes, scanAttributes, formatAttributes, parseYaml | the document index and parsers |
scopesAt, shapeAt, shapeOf, shapeFromSchema | binding 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, formatTable | edits: (state, …) → Edit |
comarkCommands, comarkKeymap, toCommand | CodeMirror 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().