-
deleteText(index, length)
-
Delete some content from the editor.
Parameters:
Name |
Type |
Description |
index |
number
|
the start index of the range |
length |
number
|
the length of the range |
-
-
Format text at the current selection. If the current selection has length of 0, then the format will be set active.
Parameters:
-
getContents()
-
Gets the current contents in the editor
Returns:
Returns the current contents in the editor
-
Type
-
string
-
-
Gets the format of the text in the given range.
Parameters:
Name |
Type |
Description |
index |
number
|
the start index of the range |
length |
number
|
the length of the range |
Returns:
Returns the format of the given range
-
Type
-
object
-
getSelection()
-
Gets the current selection range in the editor.
Returns:
Returns the current selection range
-
Type
-
CoreControls.EditBoxManager.Range
-
hasFocus()
-
Checks if the editor is being focused.
Returns:
Whether the editor is focused
-
Type
-
boolean
-
insertText(index, contents)
-
Insert the content in the editor.
Parameters:
Name |
Type |
Description |
index |
number
|
the start index of the range |
contents |
string
|
the contents that need to be updated in the editor |
-
setSelection(index, length)
-
Sets the current selection in the editor.
Parameters:
Name |
Type |
Description |
index |
number
|
the start index of the range |
length |
number
|
the length of the selection range |
-
setText(contents)
-
Sets the content in the editor.
Parameters:
Name |
Type |
Description |
contents |
string
|
the contents that need to be updated in the editor |