Readonly
activeReadonly
activeThe line number of the active line.
Readonly
extensionsObject storing some of the extensions added to the editor.
Optional
codeOptional
cursor?: CursorOptional
history?: EditHistoryOptional
indentOptional
matchOptional
matchOptional
searchReadonly
focusedWhether the textarea
is focused.
Readonly
inputRecord mapping an input to a function called when that input is typed.
Readonly
keyRecord mapping KeyboardEvent.key to a function called when that key is pressed.
Readonly
optionsCurrent options for the editor. The event handlers can be changed by
mutating this object. Use setOptions
to change the other options.
Readonly
overlaysElement containing overlays that are absolutely positioned ontop or behind the code. It is completely safe to append your own overlays to this element, but they will get some default styles.
Readonly
removedTrue if the remove method has been called.
Readonly
scrollThis is the outermost element of the editor.
Readonly
textareaUnderlying <textarea>
in the editor.
Readonly
tokensTokens currently displayed in the editor.
Readonly
valueCurrent code in the editor. Same as textarea.value
.
Readonly
wrapperElement wrapping the lines and overlays.
Adds extensions to the editor and calls their update methods.
Rest
...extensions: EditorExtension[]Adds a listener for events with the specified name.
Gets selectionStart
, selectionEnd
and selectionDirection
for the textarea
.
Removes a listener for events with the specified name.
Set new options for the editor. Ommitted properties will use their old value.
New options for the editor
Sets the selection for the textarea
and synchronously runs the selectionChange listeners.
If you don't want to synchronously run the listeners, use textarea.setSelectionRange
instead.
New selectionStart.
Optional
end: numberNew selectionEnd. Defaults to start
.
Optional
direction: "forward" | "backward" | "none"New direction.
Generated using TypeDoc
The line the cursor is currently on.