An event emitted on a "contextmenu".
An event emitted when editing failed because the editor is read-only.
An event emitted when the text inside this editor lost focus (i.e. cursor stops blinking).
An event emitted when the text inside this editor or an editor widget lost focus.
An event emitted when the configuration of the editor has changed. (e.g. editor.updateOptions()
)
An event emitted when the cursor position has changed.
An event emitted when the cursor selection has changed.
An event emitted when the model of this editor has changed (e.g. editor.setModel()
).
An event emitted when the content of the current model has changed.
An event emitted when the decorations of the current model have changed.
An event emitted when the language of the current model has changed.
An event emitted when the language configuration of the current model has changed.
An event emitted when the options of the current model has changed.
An event emitted when the content width or content height in the editor has changed.
An event emitted when the editor has been disposed.
An event emitted when the text inside this editor gained focus (i.e. cursor starts blinking).
An event emitted when the text inside this editor or an editor widget gained focus.
An event emitted when the layout of the editor has changed.
An event emitted when users paste text in the editor.
An event emitted when the scroll in the editor has changed.
An event emitted on a "keydown".
An event emitted on a "keyup".
An event emitted on a "mousedown".
An event emitted on a "mouseleave".
An event emitted on a "mousemove".
An event emitted on a "mouseup".
Add a content widget. Widgets must have unique ids, otherwise they will be overwritten.
Add an overlay widget. Widgets must have unique ids, otherwise they will be overwritten.
Apply the same font settings as the editor to target
.
Change the view zones. View zones are lost when a new model is attached to the editor.
All decorations added through this call will get the ownerId of this editor.
Dispose the editor.
Execute a command on the editor. The edits will land on the undo-redo stack, but no "undo stop" will be pushed.
The source of the call.
The command to execute
Execute multiple (concomitant) commands on the editor.
The source of the call.
Execute edits on the editor. The edits will land on the undo-redo stack, but no "undo stop" will be pushed.
The source of the call.
The edits to execute.
Cursor state after the edits were applied.
Brings browser focus to the editor text
Get an action that is a contribution to this editor.
The action or null if action not found.
Returns the editor's container dom node
Get the height of the editor's content.
This is information that is "erased" when computing scrollHeight = Math.max(contentHeight, height)
Get the width of the editor's content.
This is information that is "erased" when computing scrollWidth = Math.max(contentWidth, width)
Get a contribution of this editor.
The contribution or null if contribution not found.
Returns the editor's dom node
Get the editor type. Please see EditorType
.
This is to avoid an instanceof check
Get a unique id for this editor instance.
Get the layout info for the editor.
Get all the decorations on a line (filtering out decorations from other editors).
Type the getModel() of IEditor.
Get the horizontal position (left offset) for the column w.r.t to the beginning of the line.
This method works only if the line lineNumber
is currently rendered (in the editor's viewport).
Use this method with caution.
Gets a specific editor option.
Gets all the editor computed options.
Returns the primary position of the cursor.
Returns the editor's configuration (without any validation or defaults).
Get the scrollHeight of the editor's viewport.
Get the scrollLeft of the editor's viewport.
Get the scrollTop of the editor's viewport.
Get the scrollWidth of the editor's viewport.
Get the visible position for position
.
The result position takes scrolling into account and is relative to the top left corner of the editor.
Explanation 1: the results of this method will change for the same position
if the user scrolls the editor.
Explanation 2: the results of this method will not change if the container of the editor gets repositioned.
Warning: the results of this method are inaccurate for positions that are outside the current editor viewport.
Returns the primary selection of the editor.
Returns all the selections of the editor.
Returns all actions associated with this editor.
Get the hit test target at coordinates clientX
and clientY
.
The coordinates are relative to the top-left of the viewport.
Hit test target or null if the coordinates fall outside the editor or the editor has no model.
Get the vertical position (top offset) for the line w.r.t. to the first line.
Get the vertical position (top offset) for the position w.r.t. to the first line.
Get value of the current model attached to this editor.
Given a position, returns a column number that takes tab-widths into account.
Returns the ranges that are currently visible. Does not account for horizontal scrolling.
Returns true if the text inside this editor is focused (i.e. cursor is blinking).
Returns true if the text inside this editor or an editor widget has focus.
Instructs the editor to remeasure its container. This method should be called when the container of the editor gets resized.
If a dimension is passed in, the passed in value will be used.
Layout/Reposition a content widget. This is a ping to the editor to call widget.getPosition() and update appropriately.
Layout/Reposition an overlay widget. This is a ping to the editor to call widget.getPosition() and update appropriately.
An event emitted after composition has ended.
An event emitted after composition has started.
Remove the "undo stop" in the undo-redo stack.
Create an "undo stop" in the undo-redo stack.
Remove a content widget.
Remove an overlay widget.
Force an editor render now.
Restores the view state of the editor from a serializable object generated by saveViewState
.
Scroll vertically as necessary and reveal a line.
Scroll vertically as necessary and reveal a line centered vertically.
Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.
Scroll vertically as necessary and reveal a line close to the top of the viewport, optimized for viewing a code definition.
Scroll vertically as necessary and reveal lines.
Scroll vertically as necessary and reveal lines centered vertically.
Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.
Scroll vertically as necessary and reveal lines close to the top of the viewport, optimized for viewing a code definition.
Scroll vertically or horizontally as necessary and reveal a position.
Scroll vertically or horizontally as necessary and reveal a position centered vertically.
Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.
Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport, optimized for viewing a code definition.
Scroll vertically or horizontally as necessary and reveal a range.
Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.
Scroll vertically or horizontally as necessary and reveal a range centered vertically.
Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.
Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport, optimized for viewing a code definition.
Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport, optimized for viewing a code definition. Only if it lies outside the viewport.
Saves current view state of the editor in a serializable object.
Sets the current model attached to this editor. If the previous model was created by the editor via the value key in the options literal object, it will be destroyed. Otherwise, if the previous model was set via setModel, or the model key in the options literal object, the previous model will not be destroyed. It is safe to call setModel(null) to simply detach the current model from the editor.
Set the primary position of the cursor. This will remove any secondary cursors.
New primary cursor's position
Change the scrollLeft of the editor's viewport.
Change the scroll position of the editor's viewport.
Change the scrollTop of the editor's viewport.
Set the primary selection of the editor. This will remove any secondary cursors.
The new selection
Set the primary selection of the editor. This will remove any secondary cursors.
The new selection
Set the primary selection of the editor. This will remove any secondary cursors.
The new selection
Set the primary selection of the editor. This will remove any secondary cursors.
The new selection
Set the selections for all the cursors of the editor. Cursors will be removed or added, as necessary.
Set the value of the current model attached to this editor.
Directly trigger a handler or an editor action.
The source of the call.
The id of the handler or the id of a contribution.
Extra data to be sent to the handler.
Update the editor's options after the editor has been created.
Generated using TypeDoc
A rich code editor.