TextEditorRuntimeInstance

TextManager editor class.

Constructor

new TextEditorRuntimeInstance(inst, properties)

Create class.
Parameters:
NameTypeDescription
instobjectThe instance object that gives to the parent's constructor.
propertiesArray.<(string|number|boolean)>the initial parameters in array

Extends

Members

_text :string

Plain text
Type:
  • string

_textHTML :string

HTML text
Type:
  • string

_placeholder :string

Placeholder text
Type:
  • string

_tooltip :string

Tooltip text
Type:
  • string

_isReadOnly :boolean

Read-only mode boolean
Type:
  • boolean

_isVisible :boolean

Visibility mode boolean
Type:
  • boolean

Methods

Release() → {object}

Handle release.
Returns:
save state in object
Type: 
object

Draw(renderer)

Draw WebGL data. Not used.
Parameters:
NameTypeDescription
rendererobjectthe instance object that gives to the parent's constructor

SaveToJson() → {object}

Returns the instance save state in object.
Returns:
save state object
Type: 
object

LoadFromJson(entries)

Load the instance state from save object.
Parameters:
NameTypeDescription
entriesobjectsave state to load

GetDebuggerProperties() → {object}

Returns the instance state in object for debugging.
Returns:
debugger object
Type: 
object

GetElementState() → {object}

Returns the instance state for DOM element.
Returns:
state object
Type: 
object

_RemoveHTML(text) → {string}

Remove HTML tags from text.
Parameters:
NameTypeDescription
textstringtext to remove HTML tags
Returns:
text without HTML tags
Type: 
string

_OnTextChange(text, textHTML)

Called when user change text data.
Parameters:
NameTypeDescription
textstringplain text from field
textHTMLstringHTML text from field

_SetText(text)

Set field's plain text.
Parameters:
NameTypeDescription
textstringplain text to set

_GetText() → {string}

Return field's HTML text.
Returns:
field's plain text
Type: 
string

_SetTextHTML(textHTML)

Set field's HTML text.
Parameters:
NameTypeDescription
textHTMLstringHTML text to set

_GetTextHTML() → {string}

Return field's HTML text.
Returns:
field's HTML text
Type: 
string

_SetPlaceholder(placeholder)

Set field's placeholder.
Parameters:
NameTypeDescription
placeholderstringplaceholder to set

_GetPlaceholder() → {string}

Return field's placeholder.
Returns:
field's placeholder
Type: 
string

_SetTooltip(tooltip)

Set field's tooltip.
Parameters:
NameTypeDescription
tooltipstringtooltip to set

_GetTooltip() → {string}

Return field's tooltip.
Returns:
field's tooltip
Type: 
string

_SetReadOnly(isReadOnly)

Set field's read-only mode.
Parameters:
NameTypeDescription
isReadOnlybooleanread-only mode to set. True is on.

_GetReadOnly() → {boolean}

Return field's read-only mode.
Returns:
read-only mode
Type: 
boolean

_SetVisible(isVisible)

Set field's visibility.
Parameters:
NameTypeDescription
isVisiblebooleanvisibility to set. True is on.

_GetVisible() → {boolean}

Return field's visibility.
Returns:
visible mode
Type: 
boolean

_GetCSSDependency() → {string}

Return CSS dependency in string between HTML style tags.
Returns:
CSS dependency
Type: 
string