Properties:
| Name | Type | Description |
|---|---|---|
bold |
bool | (default: |
color |
html.Color | The text color. |
column |
number | The column of the current cursor position (the first column is |
fontFamily |
string | The font family. |
fontSize |
number | The font size in CSS pixels. |
row |
number | The row of the current cursor position (the first row is |
selectionBackgroundColor |
html.Color | The background color of selected text. |
selectionColor |
html.Color | The color of selected text. |
selectionEnd |
number | [readonly] The ending position of the text selection. This value is the same as |
selectionStart |
number | [readonly] The starting position of the text selection. |
spellCheck |
bool | (default: |
text |
string | (default: |
Extends
Methods
-
Erases a text string at the given text position.
Name Type Description posnumber The text position to erase from.
nnumber The amount of characters to erase.
- See:
-
Inserts a text string at the given text position.
Name Type Description posnumber The text position to insert at. The text is inserted before the character at this position.
textstring The text to insert.
- See:
-
Returns the text position of the given cursor position.
Name Type Description rownumber The row number (the first row is
0).columnnumber The column number (the first column is
0).Returns:
Type Description number The text position. -
Returns the row at the given text position. To get the column, calculate
position - positionAt(rowAt(position), 0).Name Type Description positionnumber The text position.
Returns:
Type Description number The row. -
Selects the given range.
Name Type Description beginnumber The text position of the begin of the selection.
endnumber The text of position of the end of the selection.
-
Sets the input cursor position.
Name Type Description rownumber The row number (the first row is
0).columnnumber The column number (the first column is
0).- See:
-
Shifts the given rows by an amount.
Name Type Description rowStartnumber The first row to shift.
rowEndnumber The last row to shift.
bynumber The positive or negative amount of lines to shift.