Html Area
(part of package 'Servoy Extra Components') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent
This is a reference page; many components have detailed usage guides here.
Properties
dataProviderID
Type: dataprovider
displaysTags
Type: boolean
editable
Type: protected Default Value: true
enabled
Type: enabled Default Value: true
placeholderText
Type: tagstring
readOnly
Type: readOnly
responsiveHeight
Min height of the html editor, set only in responsive forms.
Type: int Default Value: 300
scrollbars
Type: scrollbars
styleClass
Type: styleclass
tabSeq
Type: tabseq
text
Type: tagstring
toolTipText
Type: tagstring
visible
Type: visible
Events
onActionMethodID(event)
Parameters:
{JSEvent} event
onDataChangeMethodID(oldValue,newValue,event)
@return {boolean}
Parameters:
{${dataproviderType}} oldValue
{${dataproviderType}} newValue
{JSEvent} event
Returns: {boolean}
onFocusGainedMethodID(event)
Parameters:
{JSEvent} event
onFocusLostMethodID(event)
Parameters:
{JSEvent} event
onRightClickMethodID(event)
Parameters:
{JSEvent} event
API
getAsPlainText()
Gets the plain text for the formatted Html Area.
Example:
Returns: string ** the plain text
getScrollX()
Returns the x scroll location of specified element - only for an element where height of element is less than the height of element content. NOTE: getScrollX() can be used with getScrollY() to set the scroll location of an element using the setScroll function.
For Example:
Example:
Returns: int ** The x scroll location in pixels.
getScrollY()
Returns the y scroll location of specified element - only for an element where height of element is less than the height of element content. NOTE: getScrollY() can be used with getScrollX() to set the scroll location of an element using the setScroll function.
For Example:
Example:
Returns: int ** The y scroll location in pixels.
getSelectedText()
Returns the currently selected text in the specified Html Area.
Example:
Returns: string Selected text in the Html Area.
replaceSelectedText(s)
Replaces the selected text; if no text has been selected, the replaced value will be inserted at the last cursor position.
Example:
Parameters:
{string} s ** s The replacement text.
Returns: string ** The new content after replace.
requestFocus(mustExecuteOnFocusGainedMethod)
Set the focus to this Html Area.
Example:
Parameters:
{boolean} [mustExecuteOnFocusGainedMethod] ** mustExecuteOnFocusGainedMethod (optional) if false will not execute the onFocusGained method; the default value is true
selectAll()
Selects all the contents of the Html Area.
Example:
setScroll(x,y)
Sets the scroll location of an element. It takes as input the X (horizontal) and Y (vertical) coordinates - starting from the TOP LEFT side of the screen - only for an element where the height of the element is greater than the height of element content NOTE: getScrollX() can be used with getScrollY() to return the current scroll location of an element; then use the X and Y coordinates with the setScroll function to set a new scroll location.
For Example:
Example:
Parameters:
Last updated