blockly > FieldMultilineInput

FieldMultilineInput class

Class for an editable text area field.


export declare class FieldMultilineInput extends FieldTextInput 

Extends: FieldTextInput


Constructor Modifiers Description
(constructor)(value, validator, config) Constructs a new instance of the FieldMultilineInput class


Property Modifiers Type Description
isOverflowedY_ protected boolean Whether Y overflow is currently occurring.
maxLines_ protected number Defines the maximum number of lines of field. If exceeded, scrolling functionality is enabled.
textGroup SVGGElement | null The SVG group element that will contain a text element for each text row when initialized.


Method Modifiers Description
configure_(config) protected Configure the field based on the given map of options.
doValueUpdate_(newValue) protected Called by setValue if the text input is valid. Updates the value of the field, and updates the text of the field if it is not currently being edited (i.e. handled by the htmlInput_). Is being redefined here to update overflow state of the field.
getDisplayText_() protected Get the text from this field as displayed on screen. May differ from getText due to ellipsis, and other formatting.
getMaxLines() Returns the maxLines config of this field.
initView() Create the block UI for this field.
onHtmlInputKeyDown_(e) protected Handle key down to the editor. Override the text input definition of this so as to not close the editor when enter is typed in.
render_() protected Updates the text of the textElement.
setMaxLines(maxLines) Sets the maxLines config for this field.
showEditor_(e, quietInput) Show the inline free-text editor on top of the text. Overrides the default behaviour to force rerender in order to correct block size, based on editor text.
updateSize_() protected Updates the size of the field based on the text.
widgetCreate_() protected Create the text input editor widget.