ContentArea extends FormField

A responsive input that resizes to its content, and adheres to explicit sizing. This Element is crucial for the UX of Spreadsheet

Example

JS
new ContentArea({
    value: "Initial Value"
})

Constructor

new ContentArea(options)
options : Object optional
value : string optional

similar to input.value

dump : function optional

transform textContent to value on change

load : function optional

transform value for input's content

onChange : function optional

event listener for change, receives (value, valueWas)

Events

EventArgumentsDescription
changenewValue, oldValuefired on focusout when value has changed

Instance Properties

P   form

The form this element is associated with, if any

The validation message for this element

The ValidityState of this element

Instance Methods

Check validity without showing UI

Returns

boolean

Called when the associated form is reset. Override in subclasses.

Called when the browser restores form state. Override in subclasses.

Parameters

state : *

the restored state

mode : string

'restore' or 'autocomplete'

Check validity and show browser validation UI if invalid

Returns

boolean

Set the form value for this element

Parameters

value : *

the value to submit with the form

Set the validity of this element

Parameters

flags : Object

ValidityStateFlags object

message : string optional

validation message

anchor : HTMLElement optional

element to anchor validation UI to