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

Property Type Description
inputEl HTMLTextAreaElement The input element.
(Inherited from AbstractTextComponent)

Methods

Method Returns Description
changeCallback(value) void The function that's called after changing the value of the component.
(Inherited from AbstractTextComponent)
getValue() string Gets the value of the input element.
(Inherited from AbstractTextComponent)
onChange(callback) this Sets the callback to handle when the value of the input element changes.
(Inherited from AbstractTextComponent)
onChanged() void Manually invokes the callback registered with onChange.
(Inherited from AbstractTextComponent)
registerOptionListener(listeners, key) this Register an option listener.
(Inherited from AbstractTextComponent)
setDisabled(disabled) this Sets the disabled state of the input element.
(Inherited from AbstractTextComponent)
setPlaceholder(placeholder) this Sets the placeholder of the input element.
(Inherited from AbstractTextComponent)
setValue(value) this Sets the value of the input element.
(Inherited from AbstractTextComponent)

Links to this page: