Skip to content

CodeMirrorModule.fromTextArea method

CodeMirrorModule › fromTextArea

Unofficial

Creates a CodeMirror 5 editor from a textarea element.

Signature:

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

Parameters:

ParameterTypeDescription
hostHTMLTextAreaElementThe textarea element to replace.
options?Cm5EditorConfiguration | undefinedOptional editor configuration.

Returns: Cm5EditorThe created editor instance.