Home Reference Source
import TextAreaComponent from 'formiojs/src/components/textarea/TextArea.js'
public class | source

TextAreaComponent

Extends:

src/Element.js~ElementComponentFieldMultivalueInputTextFieldComponent → TextAreaComponent

Direct Subclass:

ModalEditComponent

Static Member Summary

Static Public Members
public static get

builderInfo: {"title": string, "group": string, "icon": string, "documentation": string, "weight": number, "schema": *}

Static Method Summary

Static Public Methods
public static

schema(extend: ...*): *

Member Summary

Public Members
public get
public
public get
public get
public

editors: *[]

public
public get
public get
public get
public get

isPlain: *

public

Method Summary

Public Methods
public

addAutoExpanding(textarea: *, index: *)

public

attach(element: *): *

public

attachElement(element: *, index: *): *

public

detach()

public

getConvertedValue(value: *): *

public

getValue(): *

public

hasChanged(newValue: *, oldValue: *): *

public

imageHandler(moduleInstance: *, range: *, files: *)

public

init()

public

isEmpty(value: *): *

public

onChange(flags: *, fromRoot: *): *

public

renderElement(value: *, index: *): *

public

setAsyncConvertedValue(value: *): *

public

setConvertedValue(value: *, index: *): *

public

setImagesUrl(images: *): *

public

setReadOnlyValue(value: *, index: *)

public

setValue(value: *, flags: {}): *

public

setValueAt(index: *, value: *, flags: {})

public

trimBlanks(value: *): *

public

updateEditorValue(newValue: *)

Updates the editor value.

public

Inherited Summary

From class Component
public static get

Return the validator as part of the component.

public static

schema(sources: ...*): *

public static

tableView(value: *, options: *)

Provides a table view for this component.

public get
public get
public get
public get

Retrieves the CSS class name of this component.

public get
public set
public get

Build the custom style from the layout values

public get

data: *

public set
public get
public get

dataValue: *: *

Get the static value of this component.

public set

dataValue(value: *)

Sets the static value of this component.

public get
public get
public get
public get

Return if the component is disabled.

public set

disabled(disabled: boolean)

Disable this component.

public get

The empty value for this component.

public get

errorLabel: *: *

Returns the error label for this component.

public get

errors: *

public get

Get Formio instance for working with files

public get
public get
public get
public get
public get
public get
public get
public get

key: *

public get

label: *

Get this component's label text.

public set

label(value: *)

Set this component's label text and render it.

public get
public get
public get
public get
public get
public get

logic: *

public get

name: string: *

The readible name for this component.

public get
public set
public get
public set
public get

ready: *

public get
public get

rootValue: *: *

Get the data value at the root level.

public get

schema: *

Returns the JSON schema for this component.

public get
public get
public get

Return the submission timezone.

public get
public get

tree: *

public get
public get
public get
public set

visible(value: *)

public get

wysiwygDefault: {"quill": *, "ace": *, "ckeditor": *, "default": *}

public

If the component has been attached

public
public

The Form.io component JSON schema.

public
public

element: *

public

The existing error that this component has.

public

id: *

public

info: *

The element information for creating the input element.

public
public
public

Points to the parent component.

public

The data path to this specific component instance.

public

If this input has been input and provided value.

public

quill: *

public
public
public

refs: {}

References to dom elements

public

If the component has been rendered

public

Points to the root component, usually the FormComponent.

public

The row path of this component.

public

Tool tip text after processing

public

list of attached tooltips

public
public

Used to trigger a redraw event within this component.

public

type: *

public

Set the validator instance.

public

validators: [string]

The validators that are assigned to this component.

private
private

_data: *

The data object in which this component resides.

private

Determines if this component is disabled, or not.

private

Determines if this component has a condition assigned to it.

private
private
private

Determines if this component is visible, or not.

private
private
public

addAce(element: *, settings: *, onChange: *): *

public

addCKE(element: *, settings: *, onChange: *): *

public

addClass(element: *, className: *): *

public

addInputError(message: *, dirty: *, elements: *)

public

addMessages(message: *, dirty: *)

Add a new input error to this element.

public

addQuill(element: *, settings: *, onChange: *): *

public

addShortcut(element: *, shortcut: *)

public

append(element: *)

public

applyActions(newComponent: *, actions: *, result: *, row: *, data: *): *

public

asString(value: *): *

Prints out the value of this component as a string value.

public

attach(element: *): *

public
public
public

beforeNext(): *

public

beforePage(): *

Called before a next and previous page is triggered allowing the components to perform special functions.

public

Called before a submission is triggered allowing the components to perform special async functions.

public

build(element: *): *

public

calculateComponentValue(data: *, flags: *, row: *): *

public

Performs calculations in this component plus any child components.

public

checkAsyncValidity(data: *, dirty: *, row: *, silentCheck: *): *

public

checkComponentConditions(data: *, flags: *, row: *): *

Check for conditionals and hide/show the element based on those conditions.

public

checkComponentValidity(data: *, dirty: *, row: *): boolean

Checks the validity of this component and sets the error message if it is invalid.

public

checkCondition(row: *, data: *): boolean

Checks the condition of this component.

public

Checks conditions for this component and any sub components.

public

checkData(data: *, flags: *): *

Check the conditions, calculations, and validity of a single component and triggers an update if something changed.

public

checkRefresh(refreshData: *, changed: *, flags: *)

public

checkRefreshOn(changes: *, flags: *)

public

checkTemplate(templates: *, names: *, modes: *): *

public

checkTemplateMode(templatesByName: *, modes: *): *

public

checkValidity(data: *, dirty: *, row: *, silentCheck: *): *

public

clear()

public
public
public

Check if this component is conditionally visible.

public

Perform a calculated value operation.

public

createModal(element: *, attr: *, confirm: *): *

public
public

Deletes the value of the component.

public
public

detach()

Remove all event handlers.

public
public

elementInfo(): {"type": string, "component": *, "changeEvent": string, "attr": *}

Get the element information.

public

errorMessage(type: *): *

Get the error message provided a certain type of error.

public

evalContext(additional: *): *

Create an evaluation context for all script executions and interpolations.

public

fieldLogic(data: *): *

Check all triggers and apply necessary actions.

public

focus()

public
public

getElement(): HTMLElement

Returns the outside wrapping element of this component.

public

getIcon(name: *, content: *, styles: *, ref: string): *

public

getLabelInfo(): {"isRightPosition": *, "isRightAlign": *, "labelStyles": *, "contentStyles": *}

public
public

getModifiedSchema(schema: *, defaultSchema: *): *

Returns only the schema that is different from the default.

public

getRelativePath(path: *): *

public

getRoot(): *

Get FormioForm element at the root of this component tree.

public

getTemplate(names: *, modes: *): *

public

getValue(): *

Get the input value of this component.

public

getValueAsString(value: *, options: *): *

public

getValueAt(index: *): *

Get the value at a specific index.

public

getView(value: *, options: *): *

public

getWidgetValueAsString(value: *): *

Uses the widget to determine the output string.

public

hasChanged(newValue: *, oldValue: *): boolean

Determine if the value of this component has changed.

public

hasClass(element: *, className: *): *

public

Determines if this component has a condition defined.

public

hasValue(data: *): *

Returns if this component has a value set.

public

iconClass(name: *, spinning: *): *

public

inContext(component: *): boolean

Checks to see if a separate component is in the "context" of this component.

public

init()

public

invalidMessage(data: *, dirty: *): *

Returns the invalid message, or empty string if the component is valid.

public

isEmpty(value: *): *

public

isEqual(valueA: *, valueB: *): *

public
public

isValid(data: *, dirty: *): boolean

Returns if the component is valid or not.

public

Determines if the value of this component is hidden from the user as if it is coming from the server, but is protected.

public

itemValue(data: *, forceUseValue: boolean): *

public

itemValueForHTMLMode(value: *): *

public
public

loadRefs(element: *, refs: *)

public

mergeSchema(component: {}): *

public

normalizeValue(value: *): *

Normalize values coming into updateValue.

public

onChange(flags: *, fromRoot: *): *

public

performInputMapping(input: *): *

public

prepend(element: *)

public

rebuild(): *

public

redraw(): *

public

refresh(value: *)

Refreshes the component with a new value.

public

removeChild(element: *)

public

removeClass(element: *, className: *): *

public
public

removeInputError(elements: *)

public

removeShortcut(element: *, shortcut: *)

public

Removes a value out of the data array and rebuild the rows.

public

render(children: undefined, topLevel: boolean): *

public

renderString(template: *, data: *, actions: *): HTMLElement

Render a template string into html.

public

renderTemplate(name: *, data: {}, modeOption: *): *

public

Resets the value of this component.

public

Restore the value of a control.

public

rightDirection(direction: *): *

public

sanitize(string: *): *

Sanitize an html string.

public

selectOptions(select: *, tag: *, options: *, defaultValue: *)

public

setComponentValidity(messages: *, dirty: *, silentCheck: *): *

public

setContent(element: *, content: *): boolean

public

setCustomValidity(messages: *, dirty: *, external: *)

public
public

setDisabled(element: *, disabled: *)

public

setErrorClasses(elements: *, dirty: *, hasErrors: *, hasMessages: *)

public

setLoading(element: *, loading: *)

public
public

setPristine(pristine: *)

Sets the pristine flag for this component.

public

setSelectValue(select: *, value: *)

public

setValue(value: *, flags: *): boolean

Set the value of this component.

public

setValueAt(index: *, value: *)

Set the value at a specific index.

public

shouldSkipValidation(data: *, dirty: *, row: *): *

public

size(size: *): *

public

splice(index: *)

Splice a value from the dataValue.

public

t(text: string, params: Object): *

Translate a text using the i18n system.

public

triggerRootChange(args: ...*)

public

unset()

public

updateComponentValue(flags: *): *

Update a value of this component.

public

updateItems(args: ...*)

public

updateOnChange(flags: *): boolean

Update the value on change.

public

updateValue(args: *): boolean

Updates the value of this component plus all sub-components.

public

Check if a component is eligible for multiple validation

public

whenReady(): *

From class Field
public

render(element: *): *

From class Multivalue
public get
public get
public set
public get
public
public

addNewValue(value: *)

Adds a new empty value to the data array.

public

Adds a new empty value to the data array, and add a new row to contain it.

public

attach(dom: *): *

public

attachElement(element: *, index: *)

Attach inputs to the element.

public
public

detach()

public

getMaskPattern(maskName: *): *

public
public

render(): *

public
public

renderRow(value: *, index: *): *

public

updateMask(input: *, mask: *)

public

useWrapper(): *

From class Input
public static

schema(extend: ...*): *

public get

inputInfo: {"id": *, "type": string, "changeEvent": string, "content": *, "attr": *}

public get
public get
public get

prefix: *

public get
public get

suffix: *

public
public

addFocusBlurEvents(element: *)

public

attach(element: *): *

public

attachElement(element: *, index: *): *

public

createWidget(index: *): null

Creates an instance of a widget for this component.

public

detach()

public

formatValue(value: *): *

public

getMaskByName(maskName: *): *

public
public

getValueAsString(value: *, options: *): *

public

getValueAt(index: *): *

public

getWidget(index: *): *

public

getWordCount(value: *): *

public

parseValue(value: *): *

public

renderElement(value: *, index: *): *

public

setCounter(type: *, element: *, count: *, max: *)

public

setInputMask(input: *, inputMask: *): *

public

updateValue(value: *, flags: *, index: *): *

public

updateValueAt(value: *, flags: *, index: *)

From class TextFieldComponent
public static get

builderInfo: {"title": string, "icon": string, "group": string, "documentation": string, "weight": *, "schema": *}

public static

schema(extend: ...*): *

public get
public get
public get
public

getValueAt(index: *): *

Returns the value at this index.

public

isEmpty(value: *): *

public

maskValue(value: *, flags: *): *

Returns the mask value object.

public

normalizeValue(value: *, flags: *): *

Normalize the value set in the data object.

public

setValueAt(index: *, value: *, flags: *): *

Sets the value at this index.

Static Public Members

public static get builderInfo: {"title": string, "group": string, "icon": string, "documentation": string, "weight": number, "schema": *} source

Override:

TextFieldComponent#builderInfo

Static Public Methods

public static schema(extend: ...*): * source

Override:

TextFieldComponent#schema

Params:

NameTypeAttributeDescription
extend ...*

Return:

*

Public Members

public get autoExpand: * source

public autoModified: boolean source

public get defaultSchema: * source

Override:

TextFieldComponent#defaultSchema

public get defaultValue: * source

Override:

Multivalue#defaultValue

public editors: *[] source

public editorsReady: *[] source

public get htmlView: * source

public get inputInfo: * source

Override:

TextFieldComponent#inputInfo

public get isJsonValue: * source

public get isPlain: * source

public updateSizes: *[] source

Public Methods

public addAutoExpanding(textarea: *, index: *) source

Params:

NameTypeAttributeDescription
textarea *
index *

public attach(element: *): * source

Override:

Input#attach

Params:

NameTypeAttributeDescription
element *

Return:

*

public attachElement(element: *, index: *): * source

Attach inputs to the element.

Override:

Input#attachElement

Params:

NameTypeAttributeDescription
element *
index *

Return:

*

public detach() source

Remove all event handlers.

Override:

Input#detach

public getConvertedValue(value: *): * source

Params:

NameTypeAttributeDescription
value *

Return:

*

public getValue(): * source

Get the input value of this component.

Override:

Component#getValue

Return:

*

public hasChanged(newValue: *, oldValue: *): * source

Determine if the value of this component has changed.

Override:

Component#hasChanged

Params:

NameTypeAttributeDescription
newValue *
oldValue *

Return:

*

public imageHandler(moduleInstance: *, range: *, files: *) source

Params:

NameTypeAttributeDescription
moduleInstance *
range *
files *

public init() source

Override:

Component#init

public isEmpty(value: *): * source

Override:

TextFieldComponent#isEmpty

Params:

NameTypeAttributeDescription
value *
  • optional

Return:

*

public onChange(flags: *, fromRoot: *): * source

Override:

Component#onChange

Params:

NameTypeAttributeDescription
flags *
fromRoot *

Return:

*

public renderElement(value: *, index: *): * source

Override:

Input#renderElement

Params:

NameTypeAttributeDescription
value *
index *

Return:

*

public setAsyncConvertedValue(value: *): * source

Params:

NameTypeAttributeDescription
value *

Return:

*

public setConvertedValue(value: *, index: *): * source

Params:

NameTypeAttributeDescription
value *
index *

Return:

*

public setImagesUrl(images: *): * source

Params:

NameTypeAttributeDescription
images *

Return:

*

public setReadOnlyValue(value: *, index: *) source

Params:

NameTypeAttributeDescription
value *
index *

public setValue(value: *, flags: {}): * source

Set the value of this component.

Override:

Component#setValue

Params:

NameTypeAttributeDescription
value *
flags {}
  • optional
  • default: {}

Return:

*

public setValueAt(index: *, value: *, flags: {}) source

Sets the value at this index.

Override:

TextFieldComponent#setValueAt

Params:

NameTypeAttributeDescription
index *
value *
flags {}
  • optional
  • default: {}

public trimBlanks(value: *): * source

Params:

NameTypeAttributeDescription
value *

Return:

*

public updateEditorValue(newValue: *) source

Updates the editor value.

Params:

NameTypeAttributeDescription
newValue *

public validateMultiple(): * source

Check if a component is eligible for multiple validation

Override:

Component#validateMultiple

Return:

*