Skip to content

CodeMirrorAdapterExCommands

Unofficial

Built-in editor commands available through the CodeMirror adapter.

Import:

import type { CodeMirrorAdapterExCommands } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface CodeMirrorAdapterExCommands

Methods

MethodReturnsDescription
cursorCharLeft(editor)voidMove the cursor one character to the left.
indentAuto(editor)voidAuto-indent the current line or selection.
newlineAndIndent(editor)voidInsert a new line and auto-indent.
newlineAndIndentBefore(editor)voidInsert a new line before the current line and auto-indent.
redo(editor)voidRedo the last undone change.
undo(editor)voidUndo the last change.

Links to this page: