Skip to content

defineInitHook

Unofficial

Registers a function to be called when an editor is initialized.

Import:

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

Signature:

function defineInitHook(f: (cm: Cm5Editor) => void): void

Parameters:

ParameterTypeDescription
f(cm: Cm5Editor) => voidThe initialization hook function.

Returns: void