This object is used in some places where needed to show popups - like prompt; autocomplete etc.

Hierarchy (View Summary)

Constructors

Properties

Methods

_dispatchEvent _emit _signal addEventListener applyComposition autoIndent blockIndent blockOutdent blur centerSelection clearSelection copyLinesDown copyLinesUp destroy duplicateSelection endOperation execCommand find findLinkAt findNext findPrevious focus getAnimatedScroll getBehavioursEnabled getCopyText getCursorPosition getCursorPositionScreen getDisplayIndentGuides getDragDelay getFadeFoldWidgets getFirstVisibleRow getFontSize getHighlightActiveLine getHighlightGutterLine getHighlightIndentGuides getHighlightSelectedWord getKeyboardHandler getLastSearchOptions getLastVisibleRow getNumberAt getOption getOptions getOverwrite getPrintMarginColumn getReadOnly getScrollSpeed getSelection getSelectionRange getSelectionStyle getSession getShowFoldWidgets getShowInvisibles getShowPrintMargin getTheme getValue getWrapBehavioursEnabled gotoLine gotoPageDown gotoPageUp indent insert isFocused isRowFullyVisible isRowVisible jumpToMatching modifyNumber moveCursorTo moveCursorToPosition moveLinesDown moveLinesUp moveText navigateDown navigateFileEnd navigateFileStart navigateLeft navigateLineEnd navigateLineStart navigateRight navigateTo navigateUp navigateWordLeft navigateWordRight off on once onEndOperation onStartOperation openLink prompt redo remove removeAllListeners removeDefaultHandler removeEventListener removeGhostText removeLines removeListener removeToLineEnd removeToLineStart removeWordLeft removeWordRight replace replaceAll resize revealRange scrollPageDown scrollPageUp scrollToLine scrollToRow selectAll selectPageDown selectPageUp setAnimatedScroll setAutoScrollEditorIntoView setBehavioursEnabled setDefaultHandler setDisplayIndentGuides setDragDelay setFadeFoldWidgets setFontSize setGhostText setHighlightActiveLine setHighlightGutterLine setHighlightIndentGuides setHighlightSelectedWord setKeyboardHandler setOption setOptions setOverwrite setPrintMarginColumn setReadOnly setScrollSpeed setSelectionStyle setSession setShowFoldWidgets setShowInvisibles setShowPrintMargin setStyle setTheme setValue setWrapBehavioursEnabled sortLines splitLine startOperation toggleBlockComment toggleCommentLines toggleOverwrite toggleWord toLowerCase toUpperCase transposeLetters undo unsetStyle

Constructors

  • Creates and renders single line editor in popup window. If parentNode param is isset, then attaching it to this element.

    Parameters

    • OptionalparentNode: Element

    Returns AcePopup

Properties

$blockSelectEnabled?: boolean
$checkMultiselectChange: (e: any, anchor: Anchor) => void
$codeLensClickHandler?: any
$multiselectOnSessionChange?: any
$onAddRange: (e: any) => void
$onMultiSelect: (e: any) => void
$onMultiSelectExec: (e: any) => void
$onRemoveRange: (e: any) => void
$onSingleSelect: (e: any) => void
$options?: any
$reAlignText: (lines: string[], forceLeft: boolean) => string[]
$updateLenses?: () => void
$updateLensesOnInput?: () => void
addSelectionMarker: (
    orientedRange: Range & { marker?: any },
) => Range & { marker?: any }

Adds the selection and cursor.

Type declaration

    • (orientedRange: Range & { marker?: any }): Range & { marker?: any }
    • Parameters

      • orientedRange: Range & { marker?: any }

        A range containing a cursor

      Returns Range & { marker?: any }

alignCursors: () => void

Aligns the cursors or selected text.

anchor: "top" | "bottom"
anchorPos: any
anchorPosition: Point
autoSelect: boolean
cmdLine?: Editor
codeLensProviders?: CodeLenseProvider[]
commands: CommandManager
completers: Completer[]
container: HTMLElement & { env?: any; value?: any }

}

curOp: {}
data: Completion[]
elasticTabstops?: ElasticTabstopsLite
env?: any
exitMultiSelectMode: () => void

Removes all the selections except the last added one.

filterText: string
findAll: (
    needle?: string,
    options?: Partial<SearchOptions>,
    additive?: boolean,
) => number

Finds and selects all the occurrences of needle.

Type declaration

    • (needle?: string, options?: Partial<SearchOptions>, additive?: boolean): number
    • Parameters

      • Optionalneedle: string

        The text to find

      • Optionaloptions: Partial<SearchOptions>

        The search options

      • Optionaladditive: boolean

        keeps

      Returns number

      The cumulative count of all found matches

forEachSelection: (cmd: Object, args?: string, options?: Object) => void

Executes a command for each selection range.

Type declaration

    • (cmd: Object, args?: string, options?: Object): void
    • Parameters

      • cmd: Object

        The command to execute

      • Optionalargs: string

        Any arguments for the command

      • Optionaloptions: Object

      Returns void

getData: (row: number) => Completion
getHoveredRow: () => number
getRow: () => number
getSelectedText: () => string
getTextLeftOffset: () => number
goTo: (where: AcePopupNavigation) => void
hide: () => void
id: string
inMultiSelectMode?: boolean
inVirtualSelectionMode: boolean
isMouseOver?: boolean
isOpen: boolean
isTopdown: boolean
keyBinding: KeyBinding
mergeNextCommand: boolean
multiSelect?: any
previousCommand: any
prevOp: {}
removeSelectionMarker: (range: Range & { marker?: any }) => void

Removes the selection marker.

Type declaration

    • (range: Range & { marker?: any }): void
    • Parameters

      • range: Range & { marker?: any }

        The selection range added with [[Editor.addSelectionMarker addSelectionMarker()]].

      Returns void

removeSelectionMarkers: (ranges: (Range & { marker?: any })[]) => void
renderer: VirtualRenderer
searchBox?: SearchBox
selectedNode?: HTMLElement
selection: Selection
selectMore: (dir: number, skip?: boolean, stopAtFirst?: boolean) => void

Finds the next occurrence of text in an active selection and adds it to the selections.

Type declaration

    • (dir: number, skip?: boolean, stopAtFirst?: boolean): void
    • Parameters

      • dir: number

        The direction of lines to select: -1 for up, 1 for down

      • Optionalskip: boolean

        If true, removes the active selection range

      • OptionalstopAtFirst: boolean

      Returns void

selectMoreLines: (dir: number, skip?: boolean) => void

Adds a cursor above or below the active cursor.

Type declaration

    • (dir: number, skip?: boolean): void
    • Parameters

      • dir: number

        The direction of lines to select: -1 for up, 1 for down

      • Optionalskip: boolean

        If true, removes the active selection range

      Returns void

sequenceStartTime: number
session: EditSession
setData: (data: Completion[], filterText?: string) => void
setDisplaySettings?: (settings: any) => void
setRow: (line: number) => void
setSelectOnHover: (val: boolean) => void
show: (pos: any, lineHeight: number, topdownOnly?: boolean) => void
showKeyboardShortcuts?: () => void
showSettingsMenu?: () => void
textInput: any
transposeSelections: (dir: number) => void

Transposes the selected ranges.

Type declaration

    • (dir: number): void
    • Parameters

      • dir: number

        The direction to rotate selections

      Returns void

tryShow: (
    pos: any,
    lineHeight: number,
    anchor: "top" | "bottom",
    forceShow?: boolean,
) => boolean
updateSelectionMarkers: () => void

Updates the cursor and marker layers.

widgetManager?: LineWidgets

Methods

  • Type Parameters

    • K extends
          | "change"
          | "changeSelection"
          | "input"
          | "changeSession"
          | "blur"
          | "mousedown"
          | "mousemove"
          | "changeStatus"
          | "keyboardActivity"
          | "mousewheel"
          | "mouseup"
          | "beforeEndOperation"
          | "nativecontextmenu"
          | "destroy"
          | "focus"
          | "copy"
          | "paste"
          | "changeSelectionStyle"
          | "changeMode"
          | "findSearchBox"
          | "codeLensClick"
          | "select"
          | "gutterkeydown"
          | "gutterclick"
          | "showGutterTooltip"
          | "hideGutterTooltip"
          | "compositionStart"
          | "click"
          | "dblclick"
          | "tripleclick"
          | "quadclick"
          | "show"
          | "hide"
          | "changeHoverMarker"

    Parameters

    Returns void

  • Type Parameters

    Parameters

    Returns void

  • Type Parameters

    • K extends
          | "change"
          | "changeSelection"
          | "input"
          | "changeSession"
          | "blur"
          | "mousedown"
          | "mousemove"
          | "changeStatus"
          | "keyboardActivity"
          | "mousewheel"
          | "mouseup"
          | "beforeEndOperation"
          | "nativecontextmenu"
          | "destroy"
          | "focus"
          | "copy"
          | "paste"
          | "changeSelectionStyle"
          | "changeMode"
          | "findSearchBox"
          | "codeLensClick"
          | "select"
          | "gutterkeydown"
          | "gutterclick"
          | "showGutterTooltip"
          | "hideGutterTooltip"
          | "compositionStart"
          | "click"
          | "dblclick"
          | "tripleclick"
          | "quadclick"
          | "show"
          | "hide"
          | "changeHoverMarker"

    Parameters

    Returns void

  • Type Parameters

    Parameters

    Returns void

  • Type Parameters

    • K extends
          | "change"
          | "changeSelection"
          | "input"
          | "changeSession"
          | "blur"
          | "mousedown"
          | "mousemove"
          | "changeStatus"
          | "keyboardActivity"
          | "mousewheel"
          | "mouseup"
          | "beforeEndOperation"
          | "nativecontextmenu"
          | "destroy"
          | "focus"
          | "copy"
          | "paste"
          | "changeSelectionStyle"
          | "changeMode"
          | "findSearchBox"
          | "codeLensClick"
          | "select"
          | "gutterkeydown"
          | "gutterclick"
          | "showGutterTooltip"
          | "hideGutterTooltip"
          | "compositionStart"
          | "click"
          | "dblclick"
          | "tripleclick"
          | "quadclick"
          | "show"
          | "hide"
          | "changeHoverMarker"

    Parameters

    Returns void

  • Type Parameters

    Parameters

    Returns void

  • Type Parameters

    • K extends
          | "change"
          | "changeSelection"
          | "input"
          | "changeSession"
          | "blur"
          | "mousedown"
          | "mousemove"
          | "changeStatus"
          | "keyboardActivity"
          | "mousewheel"
          | "mouseup"
          | "beforeEndOperation"
          | "nativecontextmenu"
          | "destroy"
          | "focus"
          | "copy"
          | "paste"
          | "changeSelectionStyle"
          | "changeMode"
          | "findSearchBox"
          | "codeLensClick"
          | "select"
          | "gutterkeydown"
          | "gutterclick"
          | "showGutterTooltip"
          | "hideGutterTooltip"
          | "compositionStart"
          | "click"
          | "dblclick"
          | "tripleclick"
          | "quadclick"
          | "show"
          | "hide"
          | "changeHoverMarker"

    Parameters

    Returns AcePopupEventsCombined[K]

  • Type Parameters

    Parameters

    Returns EditorEvents[K]

  • Parameters

    • Optionaltext: string
    • Optionalcomposition: any

    Returns void

  • Indents the current line.

    Returns void

  • Outdents the current line.

    Returns void

  • Attempts to center the current selection on the screen.

    Returns void

  • {:Selection.clearSelection}

    Returns void

  • Copies all the selected lines down one row.

    Returns void

  • Copies all the selected lines up one row.

    Returns void

  • Parameters

    • e: any

    Returns void

    e

  • Parameters

    • command: string | string[]
    • Optionalargs: any

    Returns boolean

  • Attempts to find needle within the document. For more information on options, see [[Search Search]].

    Parameters

    • needle: any

      The text to search for (optional)

    • Optionaloptions: Partial<SearchOptions>

      An object defining various search properties

    • Optionalanimate: boolean

      If true animate scrolling

    Returns false | Range

  • Finds link at defined {row} and {column}

    Parameters

    • row: any
    • column: any

    Returns string

  • Performs another search for needle in the document. For more information on options, see [[Search Search]].

    Parameters

    • Optionaloptions: Partial<SearchOptions>

      search options

    • Optionalanimate: boolean

      If true animate scrolling

    Returns void

  • Performs a search for needle backwards. For more information on options, see [[Search Search]].

    Parameters

    • Optionaloptions: Partial<SearchOptions>

      search options

    • Optionalanimate: boolean

      If true animate scrolling

    Returns void

  • Brings the current textInput into focus.

    Returns void

  • Returns true if the behaviors are currently enabled. {:BehaviorsDef}

    Returns boolean

  • Returns the string of text currently highlighted.

    Returns string

  • Gets the current position of the cursor.

    Returns Point

    An object that looks something like this:

    { row: currRow, column: currCol }
    
  • Returns the screen position of the cursor.

    Returns Point

  • Returns the current mouse drag delay.

    Returns number

  • {:VirtualRenderer.getFirstVisibleRow}

    Returns number

  • Gets the current font size of the editor text.

    Returns string | number

  • Returns true if current lines are always highlighted.

    Returns boolean

  • Returns true if currently highlighted words are to be highlighted.

    Returns boolean

  • Returns the keyboard handler, such as "vim" or "windows".

    Returns any

  • {:VirtualRenderer.getLastVisibleRow}

    Returns number

  • Works like [[EditSession.getTokenAt]], except it returns a number.

    Parameters

    • row: any
    • column: any

    Returns any

  • Returns true if overwrites are enabled; false otherwise.

    Returns boolean

  • Returns the column number of where the print margin is.

    Returns number

  • Returns true if the editor is set to read-only mode.

    Returns boolean

  • Returns the value indicating how fast the mouse scroll speed is (in milliseconds).

    Returns number

  • Returns the current selection style.

    Returns "fullLine" | "screenLine" | "text" | "line"

  • Returns true if the fold widgets are shown.

    Returns boolean

  • Returns true if invisible characters are being shown.

    Returns boolean

  • Returns true if the print margin is being shown.

    Returns boolean

  • {:VirtualRenderer.getTheme}

    Returns string

    The set theme

  • Returns the current session's content.

    Returns string

  • Returns true if the wrapping behaviors are currently enabled.

    Returns boolean

  • Moves the cursor to the specified line number, and also into the indicated column.

    Parameters

    • lineNumber: number

      The line number to go to

    • Optionalcolumn: number

      A column number to go to

    • Optionalanimate: boolean

      If true animates scolling

    Returns void

  • Shifts the document to wherever "page down" is, as well as moving the cursor position.

    Returns void

  • Shifts the document to wherever "page up" is, as well as moving the cursor position.

    Returns void

  • Inserts an indentation into the current cursor position or indents the selected lines.

    Returns void

  • Inserts text into wherever the cursor is pointing.

    Parameters

    • text: string

      The new text to add

    • Optionalpasted: boolean

    Returns void

  • Returns true if the current textInput is in focus.

    Returns boolean

  • Indicates if the entire row is currently visible on the screen.

    Parameters

    • row: number

      The row to check

    Returns boolean

  • Indicates if the row is currently visible on the screen.

    Parameters

    • row: number

      The row to check

    Returns boolean

  • Moves the cursor's row and column to the next matching bracket or HTML tag.

    Parameters

    • Optionalselect: boolean
    • Optionalexpand: boolean

    Returns void

  • If the character before the cursor is a number, this functions changes its value by amount.

    Parameters

    • amount: number

      The value to change the numeral by (can be negative to decrease value)

    Returns void

  • Moves the cursor to the specified row and column. Note that this does not de-select the current selection.

    Parameters

    • row: number

      The new row number

    • column: number

      The new column number

    Returns void

  • Moves the cursor to the position indicated by pos.row and pos.column.

    Parameters

    • pos: Point

      An object with two properties, row and column

    Returns void

  • Shifts all the selected lines down one row.

    Returns void

  • Shifts all the selected lines up one row.

    Returns void

  • 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 }
    

    Parameters

    • range: Range

      The range of text you want moved within the document

    • toPosition: Point

      The location (row and column) where you want to move the text to

    • Optionalcopy: boolean

    Returns Range

    The new range where the text was moved to.

  • Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.

    Parameters

    • Optionaltimes: number

      The number of times to change navigation

    Returns void

  • Moves the cursor to the end of the current file. Note that this does de-select the current selection.

    Returns void

  • Moves the cursor to the start of the current file. Note that this does de-select the current selection.

    Returns void

  • Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.

    Parameters

    • Optionaltimes: number

      The number of times to change navigation

    Returns void

  • Moves the cursor to the end of the current line. Note that this does de-select the current selection.

    Returns void

  • Moves the cursor to the start of the current line. Note that this does de-select the current selection.

    Returns void

  • Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.

    Parameters

    • Optionaltimes: number

      The number of times to change navigation

    Returns void

  • Moves the cursor to the specified row and column. Note that this does de-select the current selection.

    Parameters

    • row: number

      The new row number

    • column: number

      The new column number

    Returns void

  • Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.

    Parameters

    • Optionaltimes: number

      The number of times to change navigation

    Returns void

  • Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.

    Returns void

  • Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.

    Returns void

  • Type Parameters

    • K extends
          | "change"
          | "changeSelection"
          | "input"
          | "changeSession"
          | "blur"
          | "mousedown"
          | "mousemove"
          | "changeStatus"
          | "keyboardActivity"
          | "mousewheel"
          | "mouseup"
          | "beforeEndOperation"
          | "nativecontextmenu"
          | "destroy"
          | "focus"
          | "copy"
          | "paste"
          | "changeSelectionStyle"
          | "changeMode"
          | "findSearchBox"
          | "codeLensClick"
          | "select"
          | "gutterkeydown"
          | "gutterclick"
          | "showGutterTooltip"
          | "hideGutterTooltip"
          | "compositionStart"
          | "click"
          | "dblclick"
          | "tripleclick"
          | "quadclick"
          | "show"
          | "hide"
          | "changeHoverMarker"

    Parameters

    Returns void

  • Type Parameters

    Parameters

    Returns void

  • Type Parameters

    • K extends
          | "change"
          | "changeSelection"
          | "input"
          | "changeSession"
          | "blur"
          | "mousedown"
          | "mousemove"
          | "changeStatus"
          | "keyboardActivity"
          | "mousewheel"
          | "mouseup"
          | "beforeEndOperation"
          | "nativecontextmenu"
          | "destroy"
          | "focus"
          | "copy"
          | "paste"
          | "changeSelectionStyle"
          | "changeMode"
          | "findSearchBox"
          | "codeLensClick"
          | "select"
          | "gutterkeydown"
          | "gutterclick"
          | "showGutterTooltip"
          | "hideGutterTooltip"
          | "compositionStart"
          | "click"
          | "dblclick"
          | "tripleclick"
          | "quadclick"
          | "show"
          | "hide"
          | "changeHoverMarker"

    Parameters

    Returns AcePopupEventsCombined[K]

  • Type Parameters

    Parameters

    Returns EditorEvents[K]

  • Type Parameters

    • K extends
          | "change"
          | "changeSelection"
          | "input"
          | "changeSession"
          | "blur"
          | "mousedown"
          | "mousemove"
          | "changeStatus"
          | "keyboardActivity"
          | "mousewheel"
          | "mouseup"
          | "beforeEndOperation"
          | "nativecontextmenu"
          | "destroy"
          | "focus"
          | "copy"
          | "paste"
          | "changeSelectionStyle"
          | "changeMode"
          | "findSearchBox"
          | "codeLensClick"
          | "select"
          | "gutterkeydown"
          | "gutterclick"
          | "showGutterTooltip"
          | "hideGutterTooltip"
          | "compositionStart"
          | "click"
          | "dblclick"
          | "tripleclick"
          | "quadclick"
          | "show"
          | "hide"
          | "changeHoverMarker"

    Parameters

    Returns void

  • Type Parameters

    Parameters

    Returns void

  • Parameters

    • e: any

    Returns void

    e

  • Parameters

    • commandEvent: any

    Returns void

  • Open valid url under cursor in another tab

    Returns boolean

  • opens a prompt displaying message

    Parameters

    • message: any
    • options: any
    • callback: any

    Returns void

  • {:UndoManager.redo}

    Returns void

  • Removes the current selection or one character.

    Parameters

    • Optionaldir: "left" | "right"

      The direction of the deletion to occur, either "left" or "right"

    Returns void

  • Parameters

    • Optionalname: string

    Returns void

  • Parameters

    • name: string
    • callback: Function

    Returns void

  • Type Parameters

    • K extends
          | "change"
          | "changeSelection"
          | "input"
          | "changeSession"
          | "blur"
          | "mousedown"
          | "mousemove"
          | "changeStatus"
          | "keyboardActivity"
          | "mousewheel"
          | "mouseup"
          | "beforeEndOperation"
          | "nativecontextmenu"
          | "destroy"
          | "focus"
          | "copy"
          | "paste"
          | "changeSelectionStyle"
          | "changeMode"
          | "findSearchBox"
          | "codeLensClick"
          | "select"
          | "gutterkeydown"
          | "gutterclick"
          | "showGutterTooltip"
          | "hideGutterTooltip"
          | "compositionStart"
          | "click"
          | "dblclick"
          | "tripleclick"
          | "quadclick"
          | "show"
          | "hide"
          | "changeHoverMarker"

    Parameters

    Returns void

  • Type Parameters

    Parameters

    Returns void

  • Removes "ghost" text currently displayed in the editor.

    Returns void

  • Removes all the lines in the current selection

    Returns void

  • Type Parameters

    • K extends
          | "change"
          | "changeSelection"
          | "input"
          | "changeSession"
          | "blur"
          | "mousedown"
          | "mousemove"
          | "changeStatus"
          | "keyboardActivity"
          | "mousewheel"
          | "mouseup"
          | "beforeEndOperation"
          | "nativecontextmenu"
          | "destroy"
          | "focus"
          | "copy"
          | "paste"
          | "changeSelectionStyle"
          | "changeMode"
          | "findSearchBox"
          | "codeLensClick"
          | "select"
          | "gutterkeydown"
          | "gutterclick"
          | "showGutterTooltip"
          | "hideGutterTooltip"
          | "compositionStart"
          | "click"
          | "dblclick"
          | "tripleclick"
          | "quadclick"
          | "show"
          | "hide"
          | "changeHoverMarker"

    Parameters

    Returns void

  • Type Parameters

    Parameters

    Returns void

  • Removes all the words to the right of the current selection, until the end of the line.

    Returns void

  • Removes all the words to the left of the current selection, until the start of the line.

    Returns void

  • Removes the word directly to the left of the current selection.

    Returns void

  • Removes the word directly to the right of the current selection.

    Returns void

  • Replaces the first occurrence of options.needle with the value in replacement.

    Parameters

    • Optionalreplacement: string

      The text to replace with

    • Optionaloptions: Partial<SearchOptions>

      The [[Search Search]] options to use

    Returns number

  • Replaces all occurrences of options.needle with the value in replacement.

    Parameters

    • Optionalreplacement: string

      The text to replace with

    • Optionaloptions: Partial<SearchOptions>

      The [[Search Search]] options to use

    Returns number

  • {:VirtualRenderer.onResize}

    Parameters

    • Optionalforce: boolean

      If true, recomputes the size, even if the height and width haven't changed

    Returns void

  • Scrolls the document to wherever "page down" is, without changing the cursor position.

    Returns void

  • Scrolls the document to wherever "page up" is, without changing the cursor position.

    Returns void

  • Scrolls to a line. If center is true, it puts the line in middle of screen (or attempts to).

    Parameters

    • line: number

      The line to scroll to

    • center: boolean

      If true

    • animate: boolean

      If true animates scrolling

    • Optionalcallback: () => void

      Function to be called when the animation has finished

    Returns void

  • Moves the editor to the specified row.

    Parameters

    • row: number

    Returns void

  • Selects all the text in editor.

    Returns void

  • Selects the text from the current position of the document until where a "page down" finishes.

    Returns void

  • Selects the text from the current position of the document until where a "page up" finishes.

    Returns void

  • Parameters

    • shouldAnimate: boolean

    Returns void

  • Enables automatic scrolling of the cursor into view when editor itself is inside scrollable element

    Parameters

    • enable: boolean

      default true

    Returns void

  • Specifies whether to use behaviors or not. ["Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.]{: #BehaviorsDef}

    Parameters

    • enabled: boolean

      Enables or disables behaviors

    Returns void

  • Parameters

    • name: string
    • callback: Function

    Returns void

  • Parameters

    • display: boolean

    Returns void

  • Sets the delay (in milliseconds) of the mouse drag.

    Parameters

    • dragDelay: number

      A value indicating the new delay

    Returns void

  • Parameters

    • fade: boolean

    Returns void

  • Set a new font size (in pixels) for the editor text.

    Parameters

    • size: string | number

      A font size ( e.g. "12px")

    Returns void

  • 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.

    Parameters

    • text: string

      Text to be inserted as "ghost" text

    • Optionalposition: Point

      Position to insert text to

    Returns void

  • Determines whether or not the current line should be highlighted.

    Parameters

    • shouldHighlight: boolean

      Set to true to highlight the current line

    Returns void

  • Parameters

    • shouldHighlight: boolean

    Returns void

  • Parameters

    • highlight: boolean

    Returns void

  • Determines if the currently selected word should be highlighted.

    Parameters

    • shouldHighlight: boolean

      Set to true to highlight the currently selected word

    Returns void

  • Sets a new key handler, such as "vim" or "windows".

    Parameters

    • keyboardHandler: string | KeyboardHandler

      The new key handler

    • Optionalcb: () => void

    Returns 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.

    Parameters

    • overwrite: boolean

      Defines whether or not to set overwrites

    Returns void

  • Sets the column defining where the print margin should be.

    Parameters

    • showPrintMargin: number

      Specifies the new print margin

    Returns void

  • If readOnly is true, then the editor is set to read-only mode, and none of the content can change.

    Parameters

    • readOnly: boolean

      Specifies whether the editor can be modified or not

    Returns void

  • Sets how fast the mouse scrolling should do.

    Parameters

    • speed: number

      A value indicating the new speed (in milliseconds)

    Returns void

  • Draw selection markers spanning whole line, or only over selected text. Default value is "line"

    Parameters

    • val: "fullLine" | "screenLine" | "text" | "line"

      The new selection style "line"|"text"

    Returns void

  • Sets a new editsession to use. This method also emits the 'changeSession' event.

    Parameters

    Returns void

  • Indicates whether the fold widgets should be shown or not.

    Parameters

    • show: boolean

      Specifies whether the fold widgets are shown

    Returns void

  • If showInvisibles is set to true, invisible characters—like spaces or new lines—are show in the editor.

    Parameters

    • showInvisibles: boolean

      Specifies whether or not to show invisible characters

    Returns void

  • If showPrintMargin is set to true, the print margin is shown in the editor.

    Parameters

    • showPrintMargin: boolean

      Specifies whether or not to show the print margin

    Returns void

  • {:VirtualRenderer.setStyle}

    Parameters

    • style: string

      A class name

    Returns void

  • {:VirtualRenderer.setTheme}

    Parameters

    • theme: string | Theme

      The path to a theme

    • Optionalcb: () => void

      optional callback called when theme is loaded

    Returns void

  • Sets the current document to val.

    Parameters

    • val: string

      The new value to set for the document

    • OptionalcursorPos: number

      Where to set the new value. undefined or 0 is selectAll, -1 is at the document start, and 1 is at the end

    Returns string

    The current document value

  • Specifies whether to use wrapping behaviors or not, i.e. automatically wrapping the selection with characters such as brackets when such a character is typed in.

    Parameters

    • enabled: boolean

      Enables or disables wrapping behaviors

    Returns void

  • Splits the line at the current selection (by inserting an '\n').

    Returns void

  • Parameters

    • commandEvent: any

    Returns void

  • Given the currently selected range, this function either comments all the lines, or uncomments all of them.

    Returns void

  • Sets the value of overwrite to the opposite of whatever it currently is.

    Returns void

  • Converts the current selection entirely into lowercase.

    Returns void

  • Converts the current selection entirely into uppercase.

    Returns void

  • Transposes current line.

    Returns void

  • {:UndoManager.undo}

    Returns void

  • {:VirtualRenderer.unsetStyle}

    Parameters

    • style: string

    Returns void