Reference
Options
Everything comark() accepts.
interface ComarkOptions {
plugins?: EditorPlugin[] // later ones replace same-name earlier ones
registerDefaultPlugins?: boolean // alert, attributes, components, frontmatter, html, task-list (default true)
components?: ComponentDef[] // the component manifest
frontmatterSchema?: JSONSchema // keys and values inside the frontmatter
data?: unknown // the `data` binding root: a sample value…
dataSchema?: JSONSchema // …or a schema
meta?: unknown
metaSchema?: JSONSchema
links?: LinkTarget[] | ((typed: string) => LinkTarget[] | Promise<LinkTarget[]>) // pages and assets
codeLanguages?: LanguageDescription[] // fenced code highlighting and fence-language completion
completion?: {
slash?: boolean // `/` opens the block menu (true)
chain?: boolean // reopen after a pick with a next step (true)
drill?: boolean // → and ← (true)
info?: 'auto' | false // docs panel ('auto')
maxItems?: number // rendered options (80)
icons?: boolean // (true)
}
lint?: boolean // (true)
hover?: boolean // (true)
keymap?: boolean // (true)
theme?: boolean // (true)
}
interface LinkTarget { url: string, title?: string, kind?: 'page' | 'asset' }
Keymap
| Key | Command |
|---|---|
| Mod+B / I | bold / italic |
| Mod+Shift+C / X | code / strikethrough |
| Mod+K | link |
| Mod+Alt+0–6 | heading level (0: paragraph) |
| Mod+Shift+U / O / T | bullet / ordered / task list |
| Mod+Enter | check or uncheck a task |
| Mod+Shift+Q | quote |
| Mod+Alt+F | align the table |
Enter at the end of ::name… | body line and closer |
| * _ ` ~ over a selection | wrap it |
Plus the menu keys.