Skip to content

CreateEditorClassLanguageOptions

Options of createEditorClassLanguage. A host inside Obsidian passes the app’s apiVersion as obsidianVersion.

Import:

import type { CreateEditorClassLanguageOptions } from '@mnaoumov/obsidian-markdown-parser';

Signature:

export interface CreateEditorClassLanguageOptions extends EditorClassOptions

Extends: EditorClassOptions

Properties

PropertyTypeDescription
chunkSize?numberHow many characters a chunk spans before it is closed, at a line end. A chunk is the unit of reuse after an edit and of work per advance call.
lineClassNodeProperty?NodeProp<string>A further node prop that carries a line node's classes, joined by spaces. Obsidian's editor renders a line's classes from the lineClassNodeProp its copy of @codemirror/language adds, so a host there passes that prop.
obsidianVersion?stringThe Obsidian version, as x.y.z. From 1.15.0 on, a mark that closes emphasis, strikethrough or a code span also wears formatting-<kind>-end, and a *** that opens both emphases wears formatting-em beside formatting-strong.
(Inherited from EditorClassOptions)
tokenClassNodeProperty?NodeProp<string>A further node prop that carries a token node's classes, joined by spaces. Obsidian's editor renders a token's classes from the tokenClassNodeProp its copy of @codemirror/language adds, so a host there passes that prop.

Links to this page: