Skip to content

fromTextArea

Unofficial

Creates a CodeMirror 5 editor from a textarea element.

Import:

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

Signature:

function fromTextArea(host: HTMLTextAreaElement, options: Cm5EditorConfiguration | undefined): Cm5Editor

Parameters:

ParameterTypeDescription
hostHTMLTextAreaElementThe textarea element to replace.
optionsCm5EditorConfiguration | undefinedOptional editor configuration.

Returns: Cm5Editor — The created editor instance.