Optional
env?: anyOptional
value?: any@type{EditSession}
Static
$uidAttempts to find needle
within the document. For more information on options
, see [[Search Search
]].
The text to search for (optional)
Optional
options: Partial<SearchOptions>An object defining various search properties
Optional
animate: booleanIf true
animate scrolling
Search.find
Moves a range of text from the given range to the given position. toPosition
is an object that looks like this:
{ row: newRowLocation, column: newColumnLocation }
The range of text you want moved within the document
The location (row and column) where you want to move the text to
Optional
copy: booleanThe new range where the text was moved to.
EditSession.moveText
Scrolls to a line. If center
is true
, it puts the line in middle of screen (or attempts to).
The line to scroll to
If true
If true
animates scrolling
Optional
callback: (() => void)Function to be called when the animation has finished
VirtualRenderer.scrollToLine
Set the "ghost" text in provided position. "Ghost" text is a kind of preview text inside the editor which can be used to preview some code inline in the editor such as, for example, code completions.
Text to be inserted as "ghost" text
Optional
position: PointPosition to insert text to
Pass in true
to enable overwrites in your session, or false
to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of overwrite
changes, this function also emits the changeOverwrite
event.
Defines whether or not to set overwrites
EditSession.setOverwrite
Sets the current document to val
.
The new value to set for the document
Optional
cursorPos: numberWhere to set the new value. undefined
or 0 is selectAll, -1 is at the document start, and 1 is at the end
The current document value
Document.setValue
Generated using TypeDoc
The main entry point into the Ace functionality.
The
Editor
manages the [[EditSession]] (which manages [[Document]]s), as well as the [[VirtualRenderer]], which draws everything to the screen.Event sessions dealing with the mouse and keyboard are bubbled up from
Document
to theEditor
, which decides what to do with them.