SmartTextAreaModel
16 Dec 20254 minutes to read
Interface for a class SmartTextArea
Properties
afterSuggestionInsert EmitType<AfterSuggestionInsertArgs>
Triggered after suggestions are shown as the user types in the SmartTextArea component. Used for post-insertion analytics or updates.
beforeSuggestionInsert EmitType<BeforeSuggestionInsertArgs>
Triggered before suggestions are shown as the user types in the SmartTextArea component. Allows cancellation of suggestion insertion.
blur EmitType<FocusOutEventArgs>
Triggers when the TextArea has focus-out.
change EmitType<ChangedEventArgs>
Triggers when the content of TextArea has changed and gets focus-out.
created EmitType<Object>
Triggers when the TextArea component is created.
destroyed EmitType<Object>
Triggers when the TextArea component is destroyed.
focus EmitType<FocusInEventArgs>
Triggers when the TextArea gets focus.
input EmitType<InputEventArgs>
Triggers each time when the value of TextArea has changed.
UserPhrases string[]
Specifies a collection of phrases commonly used by the user, which can be leveraged for auto-completion and suggestions.
Provide an array of string phrases commonly used by the user to enhance auto-completion and suggestions. Include preferred tone, voice, and any relevant information such as policies, URLs, or keywords for improved suggestions.
adornmentFlow AdornmentsDirection
Specifies the adornment direction of textarea.
Controls the flow of the textarea and adornment sections (horizontal vs vertical).
adornmentOrientation AdornmentsDirection
Specifies the adornment orientation of textarea.
Controls the direction of adornment items relative to each other within their region (horizontal vs vertical).
aiSuggestionHandler Function
Callback function to get suggestion text from server to display smart suggestion.
appendTemplate string|function
Specifies the HTML template to append inside the TextArea wrapper.
Accepts an HTML string or a function returning an HTML string.
Updates dynamically when the property value changes.
cols number
specifies the visible width of the textarea, measured in average character widths.
cssClass string
Specifies the CSS class value that is appended to wrapper of Textbox.
enablePersistence boolean
Enable or disable persisting TextArea state between page reloads. If enabled, the value state will be persisted.
enableRtl boolean
Enable or disable rendering component in right to left direction.
enabled boolean
Specifies a Boolean value that indicates whether the TextArea allow user to interact with it.
floatLabelType FloatLabelType
Specifies the floating label behavior of the TextArea that the placeholder text floats above the TextArea based on the below values.
Possible values are:
-
Never- The placeholder text should not be float ever. -
Always- The placeholder text floats above the TextArea always. -
Auto- The placeholder text floats above the TextArea while focusing or enter a value in TextArea.
htmlAttributes { : }
You can add the additional html attributes such as disabled, value etc., to the element.
If you configured both property and equivalent html attribute then the component considers the property value.
locale string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
maxLength number
Specifies the maximum number of characters allowed in TextArea.
placeholder string
Specifies the text that is shown as a hint/placeholder until the user focus or enter a value in TextArea.
The property is depending on the floatLabelType property.
prependTemplate string|function
Specifies the HTML template to prepend inside the TextArea wrapper.
Accepts an HTML string or a function returning an HTML string.
Updates dynamically when the property value changes.
readonly boolean
Specifies the boolean value whether the TextArea allows user to change the text.
resizeMode Resize
Specifies the resize mode of textarea.
possible values are:
-
Vertical- The textarea element can be resized vertically. -
Horizontal- The textarea element can be resized horizontally. -
Both- The textarea element can be resized both vertically and horizontally. -
None- The textarea element cannot be resized.
rows number
specifies the visible height of the textarea, measured in lines
showClearButton boolean
Specifies a Boolean value that indicates whether the clear button is displayed in TextArea.
showSuggestionOnPopup SuggestionMode
Specifies whether suggestions should appear in a popup or inline within the text area.
possible values are:
-
Enable- Suggestions are always shown as a floating overlay, which can be tapped or clicked. -
Disable- Suggestions are always shown inline and can be accepted by pressingTabkey. -
None- Touch devices display suggestions as an overlay, while non-touch devices use inline suggestions.
userRole string
Represents the user’s role or designation, which can be used to provide role-specific suggestions or content within the smart textarea.
Provide a string that describes who is typing and for what reason, optionally giving other contextual information.
value string
Sets the content of the TextArea.
width number|string
Specifies the width of the TextArea component.