Method Summary
Public Methods | ||
public |
acceptsTableEdit(row: number): boolean Checks if the editor accepts a table at a row to be editted. |
|
public |
deleteLine(row: number): undefined Deletes a line at a specified row. |
|
public |
Gets the current cursor position. |
|
public |
getLastRow(): number Gets the last row index of the text editor. |
|
public |
Gets a line string at a row. |
|
public |
insertLine(row: number, line: string): undefined Inserts a line at a specified row. |
|
public |
Replace lines in a specified range. |
|
public |
setCursorPosition(pos: Point): undefined Sets the cursor position to a specified one. |
|
public |
setSelectionRange(range: Range): undefined Sets the selection range. |
|
public |
Batches multiple operations as a single undo/redo step. |
Public Methods
public acceptsTableEdit(row: number): boolean source
Checks if the editor accepts a table at a row to be editted.
It should return false
if, for example, the row is in a code block (not Markdown).
Params:
Name | Type | Attribute | Description |
row | number | A row index in the text editor. |
public deleteLine(row: number): undefined source
Deletes a line at a specified row.
Params:
Name | Type | Attribute | Description |
row | number | Row index, starts from |
public getLine(row: number): string source
Gets a line string at a row.
Params:
Name | Type | Attribute | Description |
row | number | Row index, starts from |
Test:
public replaceLines(startRow: number, endRow: number, lines: Array<string>): undefined source
Replace lines in a specified range.
public setCursorPosition(pos: Point): undefined source
Sets the cursor position to a specified one.
Params:
Name | Type | Attribute | Description |
pos | Point | A point object which the cursor position is set to. |