Skip to main content

Home > blockly > FieldLabel > (constructor)

FieldLabel.(constructor)

Constructs a new instance of the FieldLabel class

Signature:

constructor(value?: string | typeof Field.SKIP_SETUP, textClass?: string, config?: FieldLabelConfig);

Parameters

ParameterTypeDescription
valuestring | typeof Field.SKIP_SETUP(Optional) The initial value 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).
textClassstring(Optional) Optional CSS class for the field's text.
configFieldLabelConfig(Optional) A map of options used to configure the field. See the field creation documentation for a list of properties this parameter supports.