Stay organized with collections Save and categorize content based on your preferences.

blockly > FieldMultilineInput > (constructor)

FieldMultilineInput.(constructor)

Constructs a new instance of the FieldMultilineInput class

Signature:

constructor(opt_value?: string | Sentinel, opt_validator?: Function, opt_config?: FieldMultilineInputConfig);

Parameters

Parameter Type Description
opt_value string | Sentinel (Optional) The initial content of the field. Should cast to a string. Defaults to an empty string if null or undefined. Also accepts Field.SKIP_SETUP if you wish to skip setup (only used by subclasses that want to handle configuration and setting the field value after their own constructors have run).
opt_validator Function (Optional) An optional function that is called to validate any constraints on what the user entered. Takes the new text as an argument and returns either the accepted text, a replacement text, or null to abort the change.
opt_config FieldMultilineInputConfig (Optional) A map of options used to configure the field. See the [field creation documentation]https://developers.google.com/blockly/guides/create-custom-blocks/fields/built-in-fields/multiline-text-input#creation for a list of properties this parameter supports.