Skip to content

TextAreaComponent

Official

A text area component.

Import:

import { TextAreaComponent } from 'obsidian';

Signature:

export class TextAreaComponent extends AbstractTextComponent<HTMLTextAreaElement>

Extends: AbstractTextComponent<HTMLTextAreaElement>

Constructor

new TextAreaComponent(containerEl: HTMLElement)

Constructor.

To get the constructor instance, use getTextAreaComponentConstructor from obsidian-typings/implementations.

Properties

PropertyTypeDescription
inputElHTMLTextAreaElementThe input element.
(Inherited from AbstractTextComponent)

Methods

MethodReturnsDescription
changeCallback(value)voidThe function that's called after changing the value of the component.
(Inherited from AbstractTextComponent)
getValue()stringGets the value of the input element.
(Inherited from AbstractTextComponent)
onChange(callback)thisSets the callback to handle when the value of the input element changes.
(Inherited from AbstractTextComponent)
onChanged()voidManually invokes the callback registered with onChange.
(Inherited from AbstractTextComponent)
registerOptionListener(listeners, key)thisRegister an option listener.
(Inherited from AbstractTextComponent)
setDisabled(disabled)thisSets the disabled state of the input element.
(Inherited from AbstractTextComponent)
setPlaceholder(placeholder)thisSets the placeholder of the input element.
(Inherited from AbstractTextComponent)
setValue(value)thisSets the value of the input element.
(Inherited from AbstractTextComponent)

Links to this page: