Creates a new Editor object.
Associated VirtualRenderer that draws everything
Optional session: EditSessionThe EditSession to refer to
Optional options: Partial<EditorOptions>The default options
Adds the selection and cursor.
A range containing a cursor
Aligns the cursors or selected text.
Aligns the cursors or selected text.
Optional cmdOptional codeOptional completerOptional env?: anyOptional value?: anyOptional elasticOptional envRemoves all the selections except the last added one.
Removes all the selections except the last added one.
Finds and selects all the occurrences of needle.
Finds and selects all the occurrences of needle.
Optional needle: stringThe text to find
Optional options: Partial<Ace.SearchOptions>The search options
Optional additive: booleankeeps
The cumulative count of all found matches
The text to find
The search options
keeps
The cumulative count of all found matches
Executes a command for each selection range.
Executes a command for each selection range.
The command to execute
Optional args: stringAny arguments for the command
Optional options: ObjectThe command to execute
Any arguments for the command
Optional inOptional multiRemoves the selection marker.
Removes the selection marker.
The selection range added with [[Editor.addSelectionMarker addSelectionMarker()]].
The selection range added with [[Editor.addSelectionMarker addSelectionMarker()]].
Optional searchFinds the next occurrence of text in an active selection and adds it to the selections.
Finds the next occurrence of text in an active selection and adds it to the selections.
The direction of lines to select: -1 for up, 1 for down
Optional skip: booleanIf true, removes the active selection range
Optional stopAtFirst: booleanThe direction of lines to select: -1 for up, 1 for down
If true, removes the active selection range
Adds a cursor above or below the active cursor.
Adds a cursor above or below the active cursor.
The direction of lines to select: -1 for up, 1 for down
Optional skip: booleanIf true, removes the active selection range
The direction of lines to select: -1 for up, 1 for down
If true, removes the active selection range
Optional setOptional showOptional showTransposes the selected ranges.
Transposes the selected ranges.
The direction to rotate selections
The direction to rotate selections
Updates the cursor and marker layers.
Updates the cursor and marker layers.
Optional widgetOptional capturing: booleanAttempts to find needle within the document. For more information on options, see [[Search Search]].
The text to search for (optional)
Optional options: Partial<Ace.SearchOptions>An object defining various search properties
Optional animate: booleanIf true animate scrolling
Search.find
Performs another search for needle in the document. For more information on options, see [[Search Search]].
Optional options: Partial<Ace.SearchOptions>search options
Optional animate: booleanIf true animate scrolling
Editor.find
Performs a search for needle backwards. For more information on options, see [[Search Search]].
Optional options: Partial<Ace.SearchOptions>search options
Optional animate: booleanIf true animate scrolling
Editor.find
{:Search.getOptions} For more information on options, see [[Search Search]].
Search.getOptions
Optional optionNames: Partial<EditorOptions> | (keyof EditorOptions)[]Returns the current session being used.
Optional capturing: booleanReplaces the first occurrence of options.needle with the value in replacement.
Optional replacement: stringThe text to replace with
Optional options: Partial<Ace.SearchOptions>The [[Search Search]] options to use
Replaces all occurrences of options.needle with the value in replacement.
Optional replacement: stringThe text to replace with
Optional options: Partial<Ace.SearchOptions>The [[Search Search]] options to use
Optional animate: booleanScrolls 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
Sets a new key handler, such as "vim" or "windows".
The new key handler
Optional cb: (() => void)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 a new editsession to use. This method also emits the 'changeSession' event.
Optional session: EditSessionThe new session to use
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
Editormanages 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
Documentto theEditor, which decides what to do with them.