Skip to content

Setting.addText method

Setting › addText

Official

Add a text component to the setting.

Signature:

addText(cb: (component: TextComponent) => unknown): this

Parameters:

ParameterTypeDescription
cb(component: TextComponent) => unknownThe callback to add the text component.

Returns: thisThe setting.

Since: 0.9.7

Example:

setting.addText((text) => {
text.setValue('foo');
});