Skip to content

defineMode<T>

Unofficial

Registers a new editor mode.

Import:

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

Signature:

function defineMode(name: string, modeFactory: Cm5ModeFactory<T>): void

Parameters:

ParameterTypeDescription
namestringThe mode name.
modeFactoryCm5ModeFactory<T>The factory function that creates the mode.

Returns: void