aliases: "Editor"
cssclasses: hide-title
A common interface that bridges the gap between CodeMirror 5 and CodeMirror 6.
Signature:
export abstract class Editor
Method | Modifiers | Description |
---|---|---|
blur() |
abstract |
|
exec(command) |
abstract |
|
focus() |
abstract |
|
getCursor(string) |
abstract |
|
getDoc() |
||
getLine(line) |
abstract |
Get the text at line (0-indexed) |
getRange(from, to) |
abstract |
|
getScrollInfo() |
abstract |
|
getSelection() |
abstract |
|
getValue() |
abstract |
|
hasFocus() |
abstract |
|
lastLine() |
abstract |
|
lineCount() |
abstract |
Gets the number of lines in the document |
listSelections() |
abstract |
|
offsetToPos(offset) |
abstract |
|
posToOffset(pos) |
abstract |
|
processLines(read, write, ignoreEmpty) |
||
redo() |
abstract |
|
refresh() |
abstract |
|
replaceRange(replacement, from, to, origin) |
abstract |
|
replaceSelection(replacement, origin) |
abstract |
|
scrollIntoView(range, center) |
abstract |
|
scrollTo(x, y) |
abstract |
|
setCursor(pos, ch) |
||
setLine(n, text) |
||
setSelection(anchor, head) |
abstract |
|
setSelections(ranges, main) |
abstract |
|
setValue(content) |
abstract |
|
somethingSelected() |
||
transaction(tx, origin) |
abstract |
|
undo() |
abstract |
|
wordAt(pos) |
abstract |