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 pos
number The text position to erase from.
n
number The amount of characters to erase.
- See:
-
Inserts a text string at the given text position.
Name Type Description pos
number The text position to insert at. The text is inserted before the character at this position.
text
string The text to insert.
- See:
-
Returns the text position of the given cursor position.
Name Type Description row
number The row number (the first row is
0
).column
number 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 position
number The text position.
Returns:
Type Description number The row. -
Selects the given range.
Name Type Description begin
number The text position of the begin of the selection.
end
number The text of position of the end of the selection.
-
Sets the input cursor position.
Name Type Description row
number The row number (the first row is
0
).column
number The column number (the first column is
0
).- See:
-
Shifts the given rows by an amount.
Name Type Description rowStart
number The first row to shift.
rowEnd
number The last row to shift.
by
number The positive or negative amount of lines to shift.