The main class required to set up an Ace instance in the browser.
+The main class required to set up an Ace instance in the browser.
+Methods
- Ace.edit(String | DOMElement el)
This method embeds the Ace editor into the DOM, at the element provided by el.
This method embeds the Ace editor into the DOM, at the element provided by el.
Arguments
| el | String | DOMElement | Required. Either the id of an element, or the element itself |
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Anchor[edit] -
--
-
- Events (1)
-
-
-
- change - -
- - Constructors (1)
-
-
-
- new - -
- - Functions (4)
-
-
-
- detach - -
- getDocument - -
- getPosition - -
- setPosition - -
- - - -
- - -
- - -
- - -
Defines the floating pointer in the document. Whenever text is inserted or deleted before the cursor, the position of the cursor is updated
+Defines the floating pointer in the document. Whenever text is inserted or deleted before the cursor, the position of the cursor is updated
+Constructors
Events
- Anchor.on("change", function(Event e))
Fires whenever the anchor position changes. Events that can trigger this function include 'insertText', 'insertLines', 'removeText', and 'removeLines'.
Fires whenever the anchor position changes. Events that can trigger this function include 'insertText', 'insertLines', 'removeText', and 'removeLines'.
Arguments
| e | Event | Required. Contains data about the event |
Methods
- Anchor.detach()
When called, the 'change' event listener is removed.
When called, the 'change' event listener is removed.
- Anchor.getDocument()
Returns the current document.
+Returns the current document.
+- Anchor.getPosition()
Returns an object identifying the row and column position of the current anchor.
Returns an object identifying the row and column position of the current anchor.
Sets the anchor position to the specified row and column. If noClip is true, the position is not clipped.
Sets the anchor position to the specified row and column. If noClip is true, the position is not clipped.
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
BackgroundTokenizer[edit] -
--
-
- - -
- Constructors (1)
-
-
-
- new - -
- - Functions (7)
-
-
-
- fireUpdateEvent - -
- getState - -
- getTokens - -
- setDocument - -
- setTokenizer - -
- start - -
- stop - -
- - - -
- - -
- - -
- - -
Tokenizes the current Document in the background, and caches the tokenized rows for future use. If a certain row is changed, everything below that row is re-tokenized.
+Tokenizes the current Document in the background, and caches the tokenized rows for future use. If a certain row is changed, everything below that row is re-tokenized.
+Constructors
Methods
Emits the 'update' event. firstRow and lastRow are used to define the boundaries of the region to be updated.
Emits the 'update' event. firstRow and lastRow are used to define the boundaries of the region to be updated.
- BackgroundTokenizer.stop()
Stops tokenizing.
+Stops tokenizing.
+About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Document[edit] -
--
-
- - -
- Constructors (1)
-
-
-
- new - -
- - Functions (23)
-
-
-
- applyDeltas - -
- createAnchor - -
- getAllLines - -
- getLength - -
- getLine - -
- getLines - -
- getNewLineCharacter - -
- getNewLineMode - -
- getTextRange - -
- getValue - -
- insert - -
- insertInLine - -
- insertLines - -
- insertNewLine - -
- isNewLine - -
- remove - -
- removeInLine - -
- removeLines - -
- removeNewLine - -
- replace - -
- revertDeltas - -
- setNewLineMode - -
- setValue - -
- - - -
- - -
- - -
- - -
Contains the text of the document. Document can be attached to several EditSessions. At its core, Documents are just an array of strings, with each row in the document matching up to the array index.
Contains the text of the document. Document can be attached to several EditSessions. At its core, Documents are just an array of strings, with each row in the document matching up to the array index.
Constructors
Methods
- Document.$clipPosition(position)
- Internal
- Document.$detectNewLine(text)
- Void
- Internal
- Document.applyDeltas(deltas)
- Void
Applies all the changes previously accumulated. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
Applies all the changes previously accumulated. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
- Document.getAllLines()
- [ String ]
Returns all lines in the document as string array. Warning: The caller should not modify this array!
+Returns all lines in the document as string array. Warning: The caller should not modify this array!
+- Document.getLength()
Returns the number of rows in the document.
+Returns the number of rows in the document.
+Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
- Document.getNewLineCharacter()
Returns the newline character that's being used, depending on the value of newLineMode.
Returns the newline character that's being used, depending on the value of newLineMode.
- Document.getNewLineMode()
Returns the type of newlines being used; either windows, unix, or auto
Returns the type of newlines being used; either windows, unix, or auto
Given a range within the document, this function returns all the text within that range as a single string.
+Given a range within the document, this function returns all the text within that range as a single string.
+Arguments
| range | Range | Required. The range to work with |
- Document.getValue()
Returns all the lines in the document as a single string, split by the new line character.
+Returns all the lines in the document as a single string, split by the new line character.
+Inserts the elements in lines into the document, starting at the row index given by row. This method also triggers the 'change' event.
Inserts the elements in lines into the document, starting at the row index given by row. This method also triggers the 'change' event.
Inserts a new line into the document at the current row's position. This method also triggers the 'change' event.
Inserts a new line into the document at the current row's position. This method also triggers the 'change' event.
Arguments
| position | String | Required. The position to insert at |
Removes the specified columns from the row. This method also triggers the 'change' event.
Removes the specified columns from the row. This method also triggers the 'change' event.
- Document.removeNewLine(Number row)
- Void
Removes the new line between row and the row immediately following it. This method also triggers the 'change' event.
Removes the new line between row and the row immediately following it. This method also triggers the 'change' event.
Arguments
| row | Number | Required. The row to check |
- Document.revertDeltas(deltas)
- Void
Reverts any changes previously applied. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
Reverts any changes previously applied. These can be either 'includeText', 'insertLines', 'removeText', and 'removeLines'.
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
EditSession[edit] -
--
-
- Events (5)
-
-
-
- change - -
- changeFold - -
- changeScrollLeft - -
- changeScrollTop - -
- tokenizerUpdate - -
- - Constructors (1)
-
-
-
- new - -
- - Functions (74)
-
-
-
- addDynamicMarker - -
- addGutterDecoration - -
- addMarker - -
- clearAnnotations - -
- clearBreakpoint - -
- clearBreakpoints - -
- documentToScreenPosition - -
- duplicateLines - -
- getAnnotations - -
- getAWordRange - -
- getBreakpoints - -
- getDocument - -
- getLength - -
- getLine - -
- getLines - -
- getMarkers - -
- getMode - -
- getNewLineMode - -
- getOverwrite - -
- getRowLength - -
- getScreenLength - -
- getScreenTabSize - -
- getScreenWidth - -
- getScrollLeft - -
- getScrollTop - -
- getSelection - -
- getState - -
- getTabSize - -
- getTabString - -
- getTextRange - -
- getTokenAt - -
- getTokens - -
- getUndoManager - -
- getUseSoftTabs - -
- getUseWorker - -
- getUseWrapMode - -
- getValue - -
- getWordRange - -
- getWrapLimit - -
- getWrapLimitRange - -
- indentRows - -
- insert - -
- isTabStop - -
- moveLinesDown - -
- moveLinesUp - -
- moveText - -
- onReloadTokenizer - -
- outdentRows - -
- redoChanges - -
- remove - -
- removeGutterDecoration - -
- removeMarker - -
- replace - -
- screenToDocumentPosition - -
- setAnnotations - -
- setBreakpoint - -
- setBreakpoints - -
- setDocument - -
- setMode - -
- setNewLineMode - -
- setOverwrite - -
- setScrollLeft - -
- setScrollTop - -
- setTabSize - -
- setUndoManager - -
- setUndoSelect - -
- setUseSoftTabs - -
- setUseWorker - -
- setUseWrapMode - -
- setValue - -
- setWrapLimitRange - -
- toggleOverwrite - -
- toString - -
- undoChanges - -
- - - -
- - -
- - -
- - -
Constructors
-Sets up a new EditSession and associates it with the given Document and TextMode.
Sets up a new EditSession and associates it with the given Document and TextMode.
- -
Events
--
-
-
-
-
-
- EditSession.on("change", function(e)) -
-
-
-
Emitted when the document changes.
- -Emitted when the document changes.
- --
-
-
-
-
-
-
- EditSession.on("changeFold", function(e)) -
-
-
-
Emitted when a code fold added or removed.
- -Emitted when a code fold added or removed.
- --
-
-
-
-
-
-
- EditSession.on("changeScrollLeft", function()) -
-
-
-
Emitted when the scroll left changes.
- -Emitted when the scroll left changes.
- --
-
-
-
-
-
-
- EditSession.on("changeScrollTop", function()) -
-
-
-
Emitted when the scroll top changes.
- -Emitted when the scroll top changes.
- --
-
-
-
-
-
-
- EditSession.on("tokenizerUpdate", function(e)) -
-
-
-
Emitted when a background tokenizer asynchronousely processes new rows.
- -Emitted when a background tokenizer asynchronousely processes new rows.
- --
Methods
--
-
- - -
-
-
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
- -
-
-
-
-
-
-
- EditSession.clearAnnotations() -
-
-
-
Clears all the annotations for this session. This function also triggers the 'changeAnnotation' event.
Clears all the annotations for this session. This function also triggers the 'changeAnnotation' event.
-
-
-
-
-
-
-
- EditSession.clearBreakpoint(Number row) -
-
-
-
Removes a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
Removes a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
-
Arguments
| row | Number | Required. A row index |
-
-
-
-
-
-
- EditSession.clearBreakpoints() -
-
-
-
Removes all breakpoints on the rows. This function also emites the 'changeBreakpoint' event.
Removes all breakpoints on the rows. This function also emites the 'changeBreakpoint' event.
-
-
-
- Related to EditSession.screenToDocumentPosition -
Converts document coordinates to screen coordinates. {:conversionConsiderations}
- -Converts document coordinates to screen coordinates. {:conversionConsiderations}
- -- -
Duplicates all the text between firstRow and lastRow.
Duplicates all the text between firstRow and lastRow.
- -
-
-
-
-
-
-
- EditSession.getAnnotations() -
-
-
-
-
- Object -
-
-
-
Returns the annotations for the EditSession.
Returns the annotations for the EditSession.
-
-
-
-
-
-
-
- EditSession.getBreakpoints() -
-
-
-
-
- Array -
-
-
-
Returns an array of numbers, indicating which rows have breakpoints.
- -Returns an array of numbers, indicating which rows have breakpoints.
- --
-
-
-
-
-
-
- EditSession.getDocument() -
-
-
-
-
- Document -
-
-
-
Returns the Document associated with this session.
Returns the Document associated with this session.
-
-
-
-
-
-
-
- EditSession.getLength() -
-
-
-
-
- Number -
-
-
-
- Related to Document.getLength -
Returns the number of rows in the document.
- -Returns the number of rows in the document.
- --
-
-
- Related to Document.getLine -
Returns a verbatim copy of the given line as it is in the document
- -Returns a verbatim copy of the given line as it is in the document
- --
Arguments
| row | Number | Required. The row to retrieve from |
-
-
- Related to Document.getLines -
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
- -
Returns an array containing the IDs of all the markers, either front or back.
- -Returns an array containing the IDs of all the markers, either front or back.
- --
Arguments
| inFront | Boolean | Required. If true, indicates you only want front markers; false indicates only back markers |
-
-
-
-
-
-
- EditSession.getMode() -
-
-
-
-
- TextMode -
-
-
-
Returns the current text mode.
- -Returns the current text mode.
- --
-
-
-
-
-
-
- EditSession.getNewLineMode() -
-
-
-
-
- String -
-
-
-
- Related to Document.getNewLineMode -
Returns the current new line mode.
- -Returns the current new line mode.
- --
-
-
-
-
-
-
- EditSession.getOverwrite() -
-
-
-
-
- Boolean -
-
-
-
Returns true if overwrites are enabled; false otherwise.
Returns true if overwrites are enabled; false otherwise.
-
-
-
-
-
-
-
- EditSession.getScreenLength() -
-
-
-
-
- Number -
-
-
-
Returns the length of the screen.
- -Returns the length of the screen.
- --
The distance to the next tab stop at the specified screen column.
- -The distance to the next tab stop at the specified screen column.
- --
Arguments
| screenColumn | Number | Required. The screen column to check |
-
-
-
-
-
-
- EditSession.getScreenWidth() -
-
-
-
-
- Number -
-
-
-
Returns the width of the screen.
- -Returns the width of the screen.
- --
-
-
-
-
-
-
- EditSession.getScrollLeft() -
-
-
-
-
- Number -
-
-
-
[Returns the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.getScrollLeft}
- -[Returns the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.getScrollLeft}
- --
-
-
-
-
-
-
- EditSession.getScrollTop() -
-
-
-
-
- Number -
-
-
-
[Returns the value of the distance between the top of the editor and the topmost part of the visible content.]{: #EditSession.getScrollTop}
- -[Returns the value of the distance between the top of the editor and the topmost part of the visible content.]{: #EditSession.getScrollTop}
- --
-
-
-
-
-
-
- EditSession.getSelection() -
-
-
-
-
- String -
-
-
-
Returns the string of the current selection.
- -Returns the string of the current selection.
- --
-
-
- Related to BackgroundTokenizer.getState -
{:BackgroundTokenizer.getState}
- -{:BackgroundTokenizer.getState}
- --
Arguments
| row | Number | Required. The row to start at |
-
-
-
-
-
-
- EditSession.getTabSize() -
-
-
-
-
- Number -
-
-
-
Returns the current tab size.
- -Returns the current tab size.
- --
-
-
-
-
-
-
- EditSession.getTabString() -
-
-
-
-
- String -
-
-
-
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize); otherwise it's simply '\t'.
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize); otherwise it's simply '\t'.
-
-
-
- Related to Document.getTextRange -
{:Document.getTextRange.desc}
- -{:Document.getTextRange.desc}
- --
Arguments
| range | String | Required. The range to work with |
-
-
- Related to BackgroundTokenizer.getTokens -
Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
- -Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
- --
Arguments
| row | Number | Required. The row to start at |
-
-
-
-
-
-
- EditSession.getUndoManager() -
-
-
-
-
- UndoManager -
-
-
-
Returns the current undo manager.
- -Returns the current undo manager.
- --
-
-
-
-
-
-
- EditSession.getUseSoftTabs() -
-
-
-
-
- Boolean -
-
-
-
Returns true if soft tabs are being used, false otherwise.
Returns true if soft tabs are being used, false otherwise.
-
-
-
-
-
-
-
- EditSession.getUseWorker() -
-
-
-
-
- Boolean -
-
-
-
Returns true if workers are being used.
Returns true if workers are being used.
-
-
-
-
-
-
-
- EditSession.getUseWrapMode() -
-
-
-
-
- Boolean -
-
-
-
Returns true if wrap mode is being used; false otherwise.
Returns true if wrap mode is being used; false otherwise.
-
-
-
-
-
-
-
- EditSession.getValue() -
-
-
-
-
- String -
-
-
-
- Aliased as: EditSession.toString -
Given a starting row and column, this method returns the Range of the first word boundary it finds.
Given a starting row and column, this method returns the Range of the first word boundary it finds.
- -
-
-
-
-
-
-
- EditSession.getWrapLimit() -
-
-
-
-
- Number -
-
-
-
Returns the value of wrap limit.
- -Returns the value of wrap limit.
- --
-
-
-
-
-
-
- EditSession.getWrapLimitRange() -
-
-
-
-
- Object -
-
-
-
Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
- -Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
+EditSession[edit]
- Events (5)
- Constructors (1)
- Functions (95)
- $computeWrapSplits
- $constrainWrapLimit
- $detectNewLine
- $getDisplayTokens
- $getStringScreenWidth
- $getUndoSelection
- $resetRowCache
- $startWorker
- $syncInformUndoManager
- $updateInternalDataOnChange
- $updateWrapData
- addDynamicMarker
- addGutterDecoration
- addMarker
- adjustWrapLimit
- clearAnnotations
- clearBreakpoint
- clearBreakpoints
- documentToScreenColumn
- documentToScreenPosition
- documentToScreenRow
- duplicateLines
- getAnnotations
- getAWordRange
- getBreakpoints
- getDocument
- getDocumentLastRowColumn
- getDocumentLastRowColumnPosition
- getLength
- getLine
- getLines
- getMarkers
- getMode
- getNewLineMode
- getOverwrite
- getRowLength
- getRowSplitData
- getScreenLastRowColumn
- getScreenLength
- getScreenTabSize
- getScreenWidth
- getScrollLeft
- getScrollTop
- getSelection
- getState
- getTabSize
- getTabString
- getTextRange
- getTokenAt
- getTokens
- getUndoManager
- getUseSoftTabs
- getUseWorker
- getUseWrapMode
- getValue
- getWordRange
- getWrapLimit
- getWrapLimitRange
- indentRows
- insert
- isTabStop
- moveLinesDown
- moveLinesUp
- moveText
- onReloadTokenizer
- outdentRows
- redoChanges
- remove
- removeGutterDecoration
- removeMarker
- replace
- screenToDocumentColumn
- screenToDocumentPosition
- screenToDocumentRow
- setAnnotations
- setBreakpoint
- setBreakpoints
- setDocument
- setMode
- setNewLineMode
- setOverwrite
- setScrollLeft
- setScrollTop
- setTabSize
- setUndoManager
- setUndoSelect
- setUseSoftTabs
- setUseWorker
- setUseWrapMode
- setValue
- setWrapLimitRange
- stopWorker
- toggleOverwrite
- toString
- undoChanges
Constructors
Sets up a new EditSession and associates it with the given Document and TextMode.
Sets up a new EditSession and associates it with the given Document and TextMode.
Events
- EditSession.on("change", function(e))
Emitted when the document changes.
+Emitted when the document changes.
+- EditSession.on("changeFold", function(e))
Emitted when a code fold added or removed.
+Emitted when a code fold added or removed.
+- EditSession.on("changeScrollLeft", function())
Emitted when the scroll left changes.
+Emitted when the scroll left changes.
+- EditSession.on("changeScrollTop", function())
Emitted when the scroll top changes.
+Emitted when the scroll top changes.
+- EditSession.on("tokenizerUpdate", function(e))
Emitted when a background tokenizer asynchronousely processes new rows.
+Emitted when a background tokenizer asynchronousely processes new rows.
+Methods
- EditSession.$computeWrapSplits(tokens, wrapLimit)
- Internal
- EditSession.$constrainWrapLimit(wrapLimit)
- Internal
- EditSession.$detectNewLine(String text)
- Internal
If text contains either the newline (\n) or carriage-return ('\r') characters, $autoNewLine stores that value.
If text contains either the newline (\n) or carriage-return ('\r') characters, $autoNewLine stores that value.
Arguments
| text | String | Required. A block of text |
- Internal
Calculates the width of the string str on the screen while assuming that the string starts at the first column on the screen.
Calculates the width of the string str on the screen while assuming that the string starts at the first column on the screen.
- EditSession.$getUndoSelection(deltas, isUndo, lastUndoRange)
- Internal
- EditSession.$startWorker()
- Internal
- EditSession.$syncInformUndoManager()
- Internal
- EditSession.$updateInternalDataOnChange()
- Internal
- EditSession.$updateWrapData(firstRow, lastRow)
- Internal
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
Adds a new marker to the given Range. If inFront is true, a front marker is defined, and the 'changeFrontMarker' event fires; otherwise, the 'changeBackMarker' event fires.
- EditSession.clearAnnotations()
Clears all the annotations for this session. This function also triggers the 'changeAnnotation' event.
Clears all the annotations for this session. This function also triggers the 'changeAnnotation' event.
- EditSession.clearBreakpoint(Number row)
Removes a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
Removes a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
Arguments
| row | Number | Required. A row index |
- EditSession.clearBreakpoints()
Removes all breakpoints on the rows. This function also emites the 'changeBreakpoint' event.
Removes all breakpoints on the rows. This function also emites the 'changeBreakpoint' event.
- EditSession.documentToScreenColumn(row, docColumn)
- Internal
- Related to EditSession.screenToDocumentPosition
Converts document coordinates to screen coordinates. This takes into account code folding, word wrap, tab size, and any other visual modifications.
+Converts document coordinates to screen coordinates. This takes into account code folding, word wrap, tab size, and any other visual modifications.
+- EditSession.documentToScreenRow(docRow, docColumn)
- Internal
- EditSession.getAnnotations()
Returns the annotations for the EditSession.
Returns the annotations for the EditSession.
- EditSession.getBreakpoints()
Returns an array of numbers, indicating which rows have breakpoints.
+Returns an array of numbers, indicating which rows have breakpoints.
+- EditSession.getDocument()
Returns the Document associated with this session.
Returns the Document associated with this session.
- EditSession.getDocumentLastRowColumnPosition(docRow, docColumn)
- Internal
- EditSession.getLength()
- Related to Document.getLength
Returns the number of rows in the document.
+Returns the number of rows in the document.
+- Related to Document.getLine
Returns a verbatim copy of the given line as it is in the document
+Returns a verbatim copy of the given line as it is in the document
+Arguments
| row | Number | Required. The row to retrieve from |
- Related to Document.getLines
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
Returns an array of strings of the rows between firstRow and lastRow. This function is inclusive of lastRow.
Returns an array containing the IDs of all the markers, either front or back.
+Returns an array containing the IDs of all the markers, either front or back.
+Arguments
| inFront | Boolean | Required. If true, indicates you only want front markers; false indicates only back markers |
- EditSession.getMode()
Returns the current text mode.
+Returns the current text mode.
+- EditSession.getNewLineMode()
- Related to Document.getNewLineMode
Returns the current new line mode.
+Returns the current new line mode.
+- EditSession.getOverwrite()
Returns true if overwrites are enabled; false otherwise.
Returns true if overwrites are enabled; false otherwise.
- EditSession.getRowSplitData(row)
- undefined
- String
- Internal
- Internal
- Related to EditSession.documentToScreenColumn
Returns the column position (on screen) for the last character in the provided row.
+Returns the column position (on screen) for the last character in the provided row.
+Arguments
| screenRow | Number | Required. The screen row to check |
- EditSession.getScreenLength()
Returns the length of the screen.
+Returns the length of the screen.
+- EditSession.getScreenWidth()
Returns the width of the screen.
+Returns the width of the screen.
+- EditSession.getScrollLeft()
Returns the value of the distance between the left of the editor and the leftmost part of the visible content.
+Returns the value of the distance between the left of the editor and the leftmost part of the visible content.
+- EditSession.getScrollTop()
Returns the value of the distance between the top of the editor and the topmost part of the visible content.
+Returns the value of the distance between the top of the editor and the topmost part of the visible content.
+- EditSession.getSelection()
Returns the string of the current selection.
+Returns the string of the current selection.
+- Related to BackgroundTokenizer.getState
Returns the state of tokenization at the end of a row.
+Returns the state of tokenization at the end of a row.
+Arguments
| row | Number | Required. The row to start at |
- EditSession.getTabSize()
Returns the current tab size.
+Returns the current tab size.
+- EditSession.getTabString()
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize); otherwise it's simply '\t'.
Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by getTabSize); otherwise it's simply '\t'.
- Related to Document.getTextRange
Given a range within the document, this function returns all the text within that range as a single string.
+Given a range within the document, this function returns all the text within that range as a single string.
+Arguments
| range | String | Required. The range to work with |
- Related to BackgroundTokenizer.getTokens
Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
+Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
+Arguments
| row | Number | Required. The row to start at |
- EditSession.getUndoManager()
Returns the current undo manager.
+Returns the current undo manager.
+- EditSession.getUseSoftTabs()
Returns true if soft tabs are being used, false otherwise.
Returns true if soft tabs are being used, false otherwise.
- EditSession.getUseWorker()
Returns true if workers are being used.
Returns true if workers are being used.
- EditSession.getUseWrapMode()
Returns true if wrap mode is being used; false otherwise.
Returns true if wrap mode is being used; false otherwise.
- EditSession.getValue()
- Aliased as: EditSession.toString
- EditSession.getWrapLimit()
Returns the value of wrap limit.
+Returns the value of wrap limit.
+- EditSession.getWrapLimitRange()
Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
+Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
{ min: wrapLimitRange_min, max: wrapLimitRange_max }
-
- -
{ min: wrapLimitRange_min, max: wrapLimitRange_max }
-
- Indents all the rows, from startRow to endRow (inclusive), by prefixing each row with the token in indentString.
Indents all the rows, from startRow to endRow (inclusive), by prefixing each row with the token in indentString.
{ min: wrapLimitRange_min, max: wrapLimitRange_max }
+Indents all the rows, from startRow to endRow (inclusive), by prefixing each row with the token in indentString.
Indents all the rows, from startRow to endRow (inclusive), by prefixing each row with the token in indentString.
If indentString contains the '\t' character, it's replaced by whatever is defined by getTabString.
-
If indentString contains the '\t' character, it's replaced by whatever is defined by getTabString.
Arguments
| startRow | Number | Required. Starting row |
| endRow | Number | Required. Ending row |
| indentString | String | Required. The indent token |
-
-
- Related to Document.insert -
Inserts a block of text and the indicated position.
Inserts a block of text and the indicated position.
- -
-
-
- Related to Document.insertLines -
-
-
- Related to Document.insertLines -
Shifts all the lines in the document up one, starting from firstRow and ending at lastRow.
Shifts all the lines in the document up one, starting from firstRow and ending at lastRow.
- -
{ row: newRowLocation, column: newColumnLocation }
- -{ row: newRowLocation, column: newColumnLocation }
- --
Arguments
| fromRange | Range | Required. The range of text you want moved within the document |
| toPosition | Object | Required. The location (row and column) where you want to move the text to |
Returns
| Range | The new range where the text was moved to. Moves a range of text from the given range to the given position. toPosition is an object that looks like this: |
-
-
-
-
-
-
- EditSession.onReloadTokenizer(e) -
-
-
-
-
-
- Related to Document.remove -
Removes the range from the document.
Removes the range from the document.
- -
-
-
-
-
-
-
- EditSession.removeMarker(Number markerId) -
-
-
-
Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
-
Arguments
| markerId | Number | Required. A number representing a marker |
-
-
- Related to Document.replace -
Replaces a range in the document with the new text.
Replaces a range in the document with the new text.
-
Arguments
| range | Range | Required. A specified Range to replace |
| text | String | Required. The new text to use as a replacement |
Returns
| Object | Returns an object containing the final row and column, like this:{row: endRow, column: 0}If the text and range are empty, this function returns an object containing the current range.start value.If the text is the exact same as what currently exists, this function returns an object containing the current range.end value. |
-
-
- - -
-
-
- Related to EditSession.documentToScreenPosition -
Converts characters coordinates on the screen to characters coordinates within the document. [This takes into account code folding, word wrap, tab size, and any other visual modifications.]{: #conversionConsiderations}
- -Converts characters coordinates on the screen to characters coordinates within the document. [This takes into account code folding, word wrap, tab size, and any other visual modifications.]{: #conversionConsiderations}
- -- -
-
-
-
-
-
-
- EditSession.setAnnotations(Array annotations) -
-
-
-
Sets annotations for the EditSession. This functions emits the 'changeAnnotation' event.
Sets annotations for the EditSession. This functions emits the 'changeAnnotation' event.
-
Arguments
| annotations | Array | Required. A list of annotations |
Sets a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
Sets a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
- -
-
-
-
-
-
-
- EditSession.setBreakpoints(Array rows) -
-
-
-
Sets a breakpoint on every row number given by rows. This function also emites the 'changeBreakpoint' event.
Sets a breakpoint on every row number given by rows. This function also emites the 'changeBreakpoint' event.
-
Arguments
| rows | Array | Required. An array of row indicies |
-
-
-
-
-
-
- EditSession.setDocument(Document doc) -
-
-
-
Sets the EditSession to point to a new Document. If a BackgroundTokenizer exists, it also points to doc.
Sets the EditSession to point to a new Document. If a BackgroundTokenizer exists, it also points to doc.
-
Arguments
| doc | Document | Required. The new Document to use |
-
-
-
-
-
-
- EditSession.setMode(TextMode mode) -
-
-
-
Sets a new text mode for the EditSession. This method also emits the 'changeMode' event. If a BackgroundTokenizer is set, the 'tokenizerUpdate' event is also emitted.
Sets a new text mode for the EditSession. This method also emits the 'changeMode' event. If a BackgroundTokenizer is set, the 'tokenizerUpdate' event is also emitted.
-
Arguments
| mode | TextMode | Required. Set a new text mode |
-
-
-
-
-
-
- EditSession.setNewLineMode(String newLineMode) -
-
-
- Related to Document.setNewLineMode -
-
{:Document.setNewLineMode.desc}
- -{:Document.setNewLineMode.desc}
- --
Arguments
| newLineMode | String | Required. {:Document.setNewLineMode.param} |
-
-
-
-
-
-
- EditSession.setOverwrite(Boolean overwrite) -
-
-
-
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 emites the changeOverwrite event.
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 emites the changeOverwrite event.
-
Arguments
| overwrite | Boolean | Required. Defines wheter or not to set overwrites |
-
-
-
-
-
-
- EditSession.setScrollLeft(scrollLeft) -
-
-
-
[Sets the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.setScrollLeft}
- -[Sets the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.setScrollLeft}
- --
-
-
-
-
-
-
- EditSession.setScrollTop(Number scrollTop) -
-
-
-
This function sets the scroll top value. It also emits the 'changeScrollTop' event.
This function sets the scroll top value. It also emits the 'changeScrollTop' event.
-
Arguments
| scrollTop | Number | Required. The new scroll top value |
-
-
-
-
-
-
- EditSession.setTabSize(Number tabSize) -
-
-
-
Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
-
Arguments
| tabSize | Number | Required. The new tab size |
-
-
-
-
-
-
- EditSession.setUndoManager(UndoManager undoManager) -
-
-
-
Sets the undo manager.
- -Sets the undo manager.
- --
Arguments
| undoManager | UndoManager | Required. The new undo manager |
-
-
-
-
-
-
- EditSession.setUndoSelect(Boolean enable) -
-
-
-
ENables or disables highlighting of the range where an undo occured.
- -ENables or disables highlighting of the range where an undo occured.
- --
Arguments
| enable | Boolean | Required. If true, selects the range of the reinserted change |
-
-
-
-
-
-
- EditSession.setUseSoftTabs(Boolean useSoftTabs) -
-
-
-
Pass true to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character ('\t').
Pass true to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character ('\t').
-
Arguments
| useSoftTabs | Boolean | Required. Value indicating whether or not to use soft tabs |
-
-
-
-
-
-
- EditSession.setUseWrapMode(Boolean useWrapMode) -
-
-
-
Sets whether or not line wrapping is enabled. If useWrapMode is different than the current value, the 'changeWrapMode' event is emitted.
Sets whether or not line wrapping is enabled. If useWrapMode is different than the current value, the 'changeWrapMode' event is emitted.
-
Arguments
| useWrapMode | Boolean | Required. Enable (or disable) wrap mode |
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
- -
-
-
-
-
-
-
- EditSession.toggleOverwrite() -
-
-
-
Sets the value of overwrite to the opposite of whatever it currently is.
- -Sets the value of overwrite to the opposite of whatever it currently is.
- --
-
-
-
-
-
-
- EditSession.toString() -
-
-
-
-
- String -
-
-
-
- Aliased as: EditSession.getValue -
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-If indentString contains the '\t' character, it's replaced by whatever is defined by getTabString.
Arguments
| startRow | Number | Required. Starting row |
| endRow | Number | Required. Ending row |
| indentString | String | Required. The indent token |
- Related to Document.insert
- Related to Document.insertLines
- EditSession.onReloadTokenizer(e)
- Related to Document.remove
Removes the range from the document.
Removes the range from the document.
Arguments
| range | Range | Required. A specified Range to remove |
- EditSession.removeMarker(Number markerId)
Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
Removes the marker with the specified ID. If this marker was in front, the 'changeFrontMarker' event is emitted. If the marker was in the back, the 'changeBackMarker' event is emitted.
Arguments
| markerId | Number | Required. A number representing a marker |
- EditSession.screenToDocumentColumn(screenRow, screenColumn)
- Internal
- Related to EditSession.documentToScreenPosition
Converts characters coordinates on the screen to characters coordinates within the document. This takes into account code folding, word wrap, tab size, and any other visual modifications.
+Converts characters coordinates on the screen to characters coordinates within the document. This takes into account code folding, word wrap, tab size, and any other visual modifications.
+- EditSession.screenToDocumentRow(screenRow, screenColumn)
- Internal
Sets a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
Sets a breakpoint on the row number given by rows. This function also emites the 'changeBreakpoint' event.
- EditSession.setBreakpoints(Array rows)
Sets a breakpoint on every row number given by rows. This function also emites the 'changeBreakpoint' event.
Sets a breakpoint on every row number given by rows. This function also emites the 'changeBreakpoint' event.
Arguments
| rows | Array | Required. An array of row indicies |
- EditSession.setDocument(Document doc)
Sets the EditSession to point to a new Document. If a BackgroundTokenizer exists, it also points to doc.
Sets the EditSession to point to a new Document. If a BackgroundTokenizer exists, it also points to doc.
Arguments
| doc | Document | Required. The new Document to use |
- EditSession.setMode(TextMode mode)
Sets a new text mode for the EditSession. This method also emits the 'changeMode' event. If a BackgroundTokenizer is set, the 'tokenizerUpdate' event is also emitted.
Sets a new text mode for the EditSession. This method also emits the 'changeMode' event. If a BackgroundTokenizer is set, the 'tokenizerUpdate' event is also emitted.
Arguments
| mode | TextMode | Required. Set a new text mode |
- EditSession.setNewLineMode(String newLineMode)
- Related to Document.setNewLineMode
Sets the new line mode.
+Sets the new line mode.
+Arguments
| newLineMode | String | Required. The newline mode to use; can be either windows, unix, or auto |
- EditSession.setOverwrite(Boolean overwrite)
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 emites the changeOverwrite event.
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 emites the changeOverwrite event.
Arguments
| overwrite | Boolean | Required. Defines wheter or not to set overwrites |
- EditSession.setScrollLeft(scrollLeft)
Sets the value of the distance between the left of the editor and the leftmost part of the visible content.
+Sets the value of the distance between the left of the editor and the leftmost part of the visible content.
+- EditSession.setTabSize(Number tabSize)
Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
Set the number of spaces that define a soft tab; for example, passing in 4 transforms the soft tabs to be equivalent to four spaces. This function also emits the changeTabSize event.
Arguments
| tabSize | Number | Required. The new tab size |
- EditSession.setUndoManager(UndoManager undoManager)
Sets the undo manager.
+Sets the undo manager.
+Arguments
| undoManager | UndoManager | Required. The new undo manager |
- EditSession.setUseSoftTabs(Boolean useSoftTabs)
Pass true to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character ('\t').
Pass true to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character ('\t').
Arguments
| useSoftTabs | Boolean | Required. Value indicating whether or not to use soft tabs |
- EditSession.setUseWrapMode(Boolean useWrapMode)
Sets whether or not line wrapping is enabled. If useWrapMode is different than the current value, the 'changeWrapMode' event is emitted.
Sets whether or not line wrapping is enabled. If useWrapMode is different than the current value, the 'changeWrapMode' event is emitted.
Arguments
| useWrapMode | Boolean | Required. Enable (or disable) wrap mode |
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
Sets the boundaries of wrap. Either value can be null to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for min or max are different, this method also emits the 'changeWrapMode' event.
- EditSession.stopWorker()
- Internal
- EditSession.toggleOverwrite()
Sets the value of overwrite to the opposite of whatever it currently is.
+Sets the value of overwrite to the opposite of whatever it currently is.
+- EditSession.toString()
- Aliased as: EditSession.getValue
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Editor[edit] -
--
-
- Events (13)
-
-
-
- blur - -
- change - -
- changeAnnotation - -
- changeBackMarker - -
- changeBreakpoint - -
- changeFold - -
- changeFrontMarker - -
- changeMode - -
- changeWrapLimit - -
- changeWrapMode - -
- cursorChange - -
- focus - -
- selectionChange - -
- - Constructors (1)
-
-
-
- new - -
- - Functions (117)
-
-
-
- $getSelectedRows - -
- $getVisibleRowCount - -
- $moveLines - -
- addSelectionMarker - -
- blockOutdent - -
- blur - -
- centerSelection - -
- clearSelection - -
- copyLinesDown - -
- copyLinesUp - -
- destroy - -
- exitMultiSelectMode - -
- find - -
- findAll - -
- findNext - -
- findPrevious - -
- focus - -
- forEachSelection - -
- getBehavioursEnabled - -
- getCopyText - -
- getCursorPosition - -
- getCursorPositionScreen - -
- getDragDelay - -
- getFirstVisibleRow - -
- getHighlightActiveLine - -
- getHighlightSelectedWord - -
- getKeyboardHandler - -
- getLastSearchOptions - -
- getLastVisibleRow - -
- getOverwrite - -
- getPrintMarginColumn - -
- getReadOnly - -
- getScrollSpeed - -
- getSelection - -
- getSelectionRange - -
- getSelectionStyle - -
- getSession - -
- getShowFoldWidgets - -
- getShowInvisibles - -
- getShowPrintMargin - -
- getTheme - -
- getValue - -
- gotoLine - -
- gotoPageDown - -
- gotoPageUp - -
- indent - -
- insert - -
- isFocused - -
- isRowFullyVisible - -
- isRowVisible - -
- jumpToMatching - -
- moveCursorTo - -
- moveCursorToPosition - -
- moveLinesDown - -
- moveLinesUp - -
- moveText - -
- navigateDown - -
- navigateFileEnd - -
- navigateFileStart - -
- navigateLeft - -
- navigateLineEnd - -
- navigateLineStart - -
- navigateRight - -
- navigateTo - -
- navigateUp - -
- navigateWordLeft - -
- navigateWordRight - -
- removeSelectionMarker - -
- selectMore - -
- selectMoreLines - -
- transposeSelections - -
- onCopy - -
- onCut - -
- onPaste - -
- redo - -
- remove - -
- removeLines - -
- removeToLineEnd - -
- removeToLineStart - -
- removeWordLeft - -
- removeWordRight - -
- replace - -
- replaceAll - -
- resize - -
- scrollPageDown - -
- scrollPageUp - -
- scrollToLine - -
- scrollToRow - -
- selectAll - -
- selectPageDown - -
- selectPageUp - -
- setBehavioursEnabled - -
- setDragDelay - -
- setFontSize - -
- setHighlightActiveLine - -
- setHighlightSelectedWord - -
- setKeyboardHandler - -
- setOverwrite - -
- setPrintMarginColumn - -
- setReadOnly - -
- setScrollSpeed - -
- setSelectionStyle - -
- setSession - -
- setShowFoldWidgets - -
- setShowInvisibles - -
- setShowPrintMargin - -
- setStyle - -
- setTheme - -
- setValue - -
- splitLine - -
- toggleCommentLines - -
- toggleOverwrite - -
- toLowerCase - -
- toUpperCase - -
- transposeLetters - -
- undo - -
- unsetStyle - -
- - - -
- - -
- - -
- - -
The main entry point into the Ace functionality. The Editor manages the EditSession (which manages Documents), 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 the Editor, which decides what to do with them.
Constructors
--
-
-
-
-
-
- new Editor(VirtualRenderer renderer, EditSession session) -
-
-
-
Creates a new Editor object.
Creates a new Editor object.
-
Arguments
| renderer | VirtualRenderer | Required. Associated VirtualRenderer that draws everything |
| session | EditSession | Required. The EditSession to refer to |
Events
--
-
-
-
-
-
- Editor.on("blur", function()) -
-
-
-
Emitted once the editor has been blurred.
- -Emitted once the editor has been blurred.
- --
-
-
-
-
-
-
- Editor.on("changeAnnotation", function()) -
-
-
-
Emitted when an annotation changes.
- -Emitted when an annotation changes.
- --
-
-
-
-
-
-
- Editor.on("changeBackMarker", function()) -
-
-
-
Emitted when a back marker changes.
- -Emitted when a back marker changes.
- --
-
-
-
-
-
-
- Editor.on("changeBreakpoint", function()) -
-
-
-
Emitted when a breakpoint changes.
- -Emitted when a breakpoint changes.
- --
-
-
-
-
-
-
- Editor.on("changeFold", function()) -
-
-
-
Emitted when the code folds change.
- -Emitted when the code folds change.
- --
-
-
-
-
-
-
- Editor.on("changeFrontMarker", function()) -
-
-
-
Emitted when a front marker changes.
- -Emitted when a front marker changes.
- --
-
-
-
-
-
-
- Editor.on("changeMode", function()) -
-
-
-
Emitted when the mode changes.
- -Emitted when the mode changes.
- --
-
-
-
-
-
-
- Editor.on("changeWrapLimit", function()) -
-
-
-
Emitted when the wrap limit changes.
- -Emitted when the wrap limit changes.
- --
-
-
-
-
-
-
- Editor.on("changeWrapMode", function()) -
-
-
-
Emitted when the wrap mode changes.
- -Emitted when the wrap mode changes.
- --
-
-
-
-
-
-
- Editor.on("cursorChange", function()) -
-
-
-
Emitted when the cursor changes.
- -Emitted when the cursor changes.
- --
-
-
-
-
-
-
- Editor.on("focus", function()) -
-
-
-
Emitted once the editor comes into focus.
- -Emitted once the editor comes into focus.
- --
Methods
--
-
-
-
-
-
- Editor.$getSelectedRows() -
-
-
-
-
- Object -
-
-
-
Returns an object indicating the currently selected rows. The object looks like this:
- -Returns an object indicating the currently selected rows. The object looks like this:
+Editor[edit]
- Events (13)
- Constructors (1)
- Functions (120)
- $getSelectedRows
- $getVisibleRowCount
- $highlightBrackets
- $moveLines
- $updateHighlightActiveLine
- addSelectionMarker
- blockOutdent
- blur
- centerSelection
- clearSelection
- copyLinesDown
- copyLinesUp
- destroy
- exitMultiSelectMode
- find
- findAll
- findNext
- findPrevious
- focus
- forEachSelection
- getBehavioursEnabled
- getCopyText
- getCursorPosition
- getCursorPositionScreen
- getDragDelay
- getFirstVisibleRow
- getHighlightActiveLine
- getHighlightSelectedWord
- getKeyboardHandler
- getLastSearchOptions
- getLastVisibleRow
- getOverwrite
- getPrintMarginColumn
- getReadOnly
- getScrollSpeed
- getSelection
- getSelectionRange
- getSelectionStyle
- getSession
- getShowFoldWidgets
- getShowInvisibles
- getShowPrintMargin
- getTheme
- getValue
- gotoLine
- gotoPageDown
- gotoPageUp
- indent
- insert
- isFocused
- isRowFullyVisible
- isRowVisible
- jumpToMatching
- moveCursorTo
- moveCursorToPosition
- moveLinesDown
- moveLinesUp
- moveText
- navigateDown
- navigateFileEnd
- navigateFileStart
- navigateLeft
- navigateLineEnd
- navigateLineStart
- navigateRight
- navigateTo
- navigateUp
- navigateWordLeft
- navigateWordRight
- onCopy
- onCut
- onPaste
- redo
- remove
- removeLines
- removeSelectionMarker
- removeToLineEnd
- removeToLineStart
- removeWordLeft
- removeWordRight
- replace
- replaceAll
- resize
- scrollPageDown
- scrollPageUp
- scrollToLine
- scrollToRow
- selectAll
- selectMore
- selectMoreLines
- selectPageDown
- selectPageUp
- setBehavioursEnabled
- setDragDelay
- setFontSize
- setHighlightActiveLine
- setHighlightSelectedWord
- setKeyboardHandler
- setOverwrite
- setPrintMarginColumn
- setReadOnly
- setScrollSpeed
- setSelectionStyle
- setSession
- setShowFoldWidgets
- setShowInvisibles
- setShowPrintMargin
- setStyle
- setTheme
- setValue
- splitLine
- toggleCommentLines
- toggleOverwrite
- toLowerCase
- toUpperCase
- transposeLetters
- transposeSelections
- undo
- unsetStyle
- updateSelectionMarkers
The main entry point into the Ace functionality. The Editor manages the EditSession (which manages Documents), 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 the Editor, which decides what to do with them.
Constructors
- Editor.new(VirtualRenderer renderer, EditSession session)
Creates a new Editor object.
Creates a new Editor object.
Arguments
| renderer | VirtualRenderer | Required. Associated VirtualRenderer that draws everything |
| session | EditSession | Required. The EditSession to refer to |
Events
- Editor.on("blur", function())
Emitted once the editor has been blurred.
+Emitted once the editor has been blurred.
+- Editor.on("changeAnnotation", function())
Emitted when an annotation changes.
+Emitted when an annotation changes.
+- Editor.on("changeBackMarker", function())
Emitted when a back marker changes.
+Emitted when a back marker changes.
+- Editor.on("changeBreakpoint", function())
Emitted when a breakpoint changes.
+Emitted when a breakpoint changes.
+- Editor.on("changeFold", function())
Emitted when the code folds change.
+Emitted when the code folds change.
+- Editor.on("changeFrontMarker", function())
Emitted when a front marker changes.
+Emitted when a front marker changes.
+- Editor.on("changeMode", function())
Emitted when the mode changes.
+Emitted when the mode changes.
+- Editor.on("changeWrapLimit", function())
Emitted when the wrap limit changes.
+Emitted when the wrap limit changes.
+- Editor.on("changeWrapMode", function())
Emitted when the wrap mode changes.
+Emitted when the wrap mode changes.
+- Editor.on("cursorChange", function())
Emitted when the cursor changes.
+Emitted when the cursor changes.
+- Editor.on("focus", function())
Emitted once the editor comes into focus.
+Emitted once the editor comes into focus.
+Methods
- Editor.$getSelectedRows()
Returns an object indicating the currently selected rows. The object looks like this:
+Returns an object indicating the currently selected rows. The object looks like this:
{ first: range.start.row, last: range.end.row }
- --
{ first: range.start.row, last: range.end.row }
- --
-
-
-
-
-
- Editor.$getVisibleRowCount() -
-
-
-
-
- Number -
-
-
-
Returns the number of currently visibile rows.
- -Returns the number of currently visibile rows.
- --
-
-
-
-
-
-
- Editor.$moveLines(Function mover) -
-
-
-
Executes a specific function, which can be anything that manipulates selected lines, such as copying them, duplicating them, or shifting them.
- -Executes a specific function, which can be anything that manipulates selected lines, such as copying them, duplicating them, or shifting them.
- --
Arguments
| mover | Function | Required. A method to call on each selected row |
-
-
-
-
-
-
- Editor.blockOutdent() -
-
-
- Related to EditSession.outdentRows -
-
Outdents the current line.
- -Outdents the current line.
- --
-
-
-
-
-
-
- Editor.blur() -
-
-
-
Blurs the current textInput.
Blurs the current textInput.
-
-
-
-
-
-
-
- Editor.centerSelection() -
-
-
-
Attempts to center the current selection on the screen.
- -Attempts to center the current selection on the screen.
- --
-
-
-
-
-
-
- Editor.clearSelection() -
-
-
- Related to Selection.clearSelection -
-
{:Selection.clearSelection}
- -{:Selection.clearSelection}
- --
-
-
-
-
-
-
- Editor.copyLinesDown() -
-
-
-
-
- Number -
-
-
-
- Related to EditSession.duplicateLines -
Copies all the selected lines down one row.
- -Copies all the selected lines down one row.
- --
Returns
| Number | On success, returns the number of new rows added; in other words, lastRow - firstRow + 1. |
-
-
-
-
-
-
- Editor.copyLinesUp() -
-
-
-
-
- Number -
-
-
-
- Related to EditSession.duplicateLines -
Copies all the selected lines up one row.
- -Copies all the selected lines up one row.
- --
Returns
| Number | On success, returns 0. |
-
-
-
-
-
-
- Editor.destroy() -
-
-
-
Cleans up the entire editor.
- -Cleans up the entire editor.
- --
-
-
-
-
-
-
- Editor.exitMultiSelectMode() -
-
-
-
-
- Void -
-
-
-
Removes all the selections except the last added one.
- -Removes all the selections except the last added one.
- --
-
-
-
-
-
-
-
- Related to Search.find -
-
-
-
-
-
-
-
-
-
-
- Related to Editor.find -
-
-
-
-
-
-
-
-
- Related to Editor.find -
-
-
-
-
-
-
-
- Editor.focus() -
-
-
-
Brings the current textInput into focus.
Brings the current textInput into focus.
-
-
-
-
-
-
-
- Editor.getBehavioursEnabled() -
-
-
-
-
- Boolean -
-
-
-
Returns true if the behaviors are currently enabled. {:BehaviorsDef}
Returns true if the behaviors are currently enabled. {:BehaviorsDef}
-
-
-
-
-
-
-
- Editor.getCopyText() -
-
-
-
-
- String -
-
-
-
Returns the string of text currently highlighted.
- -Returns the string of text currently highlighted.
- --
-
-
-
-
-
-
- Editor.getCursorPosition() -
-
-
-
-
- Object -
-
-
-
- Related to Selection.getCursor -
Gets the current position of the cursor.
- -Gets the current position of the cursor.
- --
Returns
| Object | This returns an object that looks something like this:{ row: currRow, column: currCol } |
-
-
-
-
-
-
- Editor.getCursorPositionScreen() -
-
-
-
-
- Number -
-
-
-
- Related to EditSession.documentToScreenPosition -
Returns the screen position of the cursor.
- -Returns the screen position of the cursor.
- --
-
-
-
-
-
-
- Editor.getDragDelay() -
-
-
-
-
- Number -
-
-
-
Returns the current mouse drag delay.
- -Returns the current mouse drag delay.
- --
-
-
-
-
-
-
- Editor.getFirstVisibleRow() -
-
-
-
-
- Number -
-
-
-
- Related to VirtualRenderer.getFirstVisibleRow -
{:VirtualRenderer.getFirstVisibleRow}
- -{:VirtualRenderer.getFirstVisibleRow}
- --
-
-
-
-
-
-
- Editor.getHighlightActiveLine() -
-
-
-
-
- Boolean -
-
-
-
Returns true if current lines are always highlighted.
Returns true if current lines are always highlighted.
-
-
-
-
-
-
-
- Editor.getHighlightSelectedWord() -
-
-
-
-
- Boolean -
-
-
-
Returns true if currently highlighted words are to be highlighted.
Returns true if currently highlighted words are to be highlighted.
-
-
-
-
-
-
-
- Editor.getKeyboardHandler() -
-
-
-
-
- String -
-
-
-
- Related to KeyBinding -
Returns the keyboard handler.
- -Returns the keyboard handler.
- --
-
-
-
-
-
-
- Editor.getLastSearchOptions() -
-
-
-
-
- Object -
-
-
-
- Related to Search.getOptions -
-
-
-
-
-
-
- Editor.getLastVisibleRow() -
-
-
-
-
- Number -
-
-
-
- Related to VirtualRenderer.getLastVisibleRow -
{:VirtualRenderer.getLastVisibleRow}
- -{:VirtualRenderer.getLastVisibleRow}
- --
-
-
-
-
-
-
- Editor.getOverwrite() -
-
-
-
-
- Boolean -
-
-
-
- Related to EditSession.getOverwrite -
Returns true if overwrites are enabled; false otherwise.
Returns true if overwrites are enabled; false otherwise.
-
-
-
-
-
-
-
- Editor.getPrintMarginColumn() -
-
-
-
-
- Number -
-
-
-
Returns the column number of where the print margin is.
- -Returns the column number of where the print margin is.
- --
-
-
-
-
-
-
- Editor.getReadOnly() -
-
-
-
-
- Boolean -
-
-
-
Returns true if the editor is set to read-only mode.
Returns true if the editor is set to read-only mode.
-
-
-
-
-
-
-
- Editor.getScrollSpeed() -
-
-
-
-
- Number -
-
-
-
Returns the value indicating how fast the mouse scroll speed is.
- -Returns the value indicating how fast the mouse scroll speed is.
- --
-
-
-
-
-
-
- Editor.getSelection() -
-
-
-
-
- String -
-
-
-
Returns the currently highlighted selection.
- -Returns the currently highlighted selection.
- --
-
-
-
-
-
-
- Editor.getSelectionRange() -
-
-
-
-
- Range -
-
-
-
- Related to Selection.getRange -
{:Selection.getRange}
- -{:Selection.getRange}
- --
-
-
-
-
-
-
- Editor.getSelectionStyle() -
-
-
-
-
- String -
-
-
-
Returns the current selection style.
- -Returns the current selection style.
- --
-
-
-
-
-
-
- Editor.getSession() -
-
-
-
-
- EditSession -
-
-
-
Returns the current session being used.
- -Returns the current session being used.
- --
-
-
-
-
-
-
- Editor.getShowFoldWidgets() -
-
-
-
-
- Boolean -
-
-
-
Returns true if the fold widgets are shown.
Returns true if the fold widgets are shown.
-
-
-
-
-
-
-
- Editor.getShowInvisibles() -
-
-
-
-
- Boolean -
-
-
-
Returns true if invisible characters are being shown.
Returns true if invisible characters are being shown.
-
-
-
-
-
-
-
- Editor.getShowPrintMargin() -
-
-
-
-
- Boolean -
-
-
-
Returns true if the print margin is being shown.
Returns true if the print margin is being shown.
-
-
-
-
-
-
-
- Editor.getTheme() -
-
-
-
-
- String -
-
-
-
- Related to VirtualRenderer.getTheme -
{:VirtualRenderer.getTheme}
- -{:VirtualRenderer.getTheme}
- --
-
-
-
-
-
-
- Editor.getValue() -
-
-
-
-
- String -
-
-
-
- Related to EditSession.getValue -
Returns the current session's content.
- -Returns the current session's content.
- --
Moves the cursor to the specified line number, and also into the indiciated column.
- -Moves the cursor to the specified line number, and also into the indiciated column.
- -- -
-
-
-
-
-
-
- Editor.gotoPageDown() -
-
-
-
Shifts the document to wherever "page down" is, as well as moving the cursor position.
- -Shifts the document to wherever "page down" is, as well as moving the cursor position.
- --
-
-
-
-
-
-
- Editor.gotoPageUp() -
-
-
-
Shifts the document to wherever "page up" is, as well as moving the cursor position.
- -Shifts the document to wherever "page up" is, as well as moving the cursor position.
- --
-
-
-
-
-
-
- Editor.indent() -
-
-
- Related to EditSession.indentRows -
-
Indents the current line.
- -Indents the current line.
- --
-
-
-
-
-
-
- Editor.isFocused() -
-
-
-
-
- Boolean -
-
-
-
Returns true if the current textInput is in focus.
Returns true if the current textInput is in focus.
-
-
-
-
-
-
-
- Editor.jumpToMatching() -
-
-
-
Moves the cursor's row and column to the next matching bracket.
- -Moves the cursor's row and column to the next matching bracket.
- --
-
-
-
-
-
-
-
- Related to Selection.moveCursorTo -
-
Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
- -Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
- -- -
-
-
-
-
-
-
- Editor.moveCursorToPosition(Object pos) -
-
-
- Related to Selection.moveCursorToPosition -
-
Moves the cursor to the position indicated by pos.row and pos.column.
Moves the cursor to the position indicated by pos.row and pos.column.
-
Arguments
| pos | Object | Required. An object with two properties, row and column |
-
-
-
-
-
-
- Editor.moveLinesDown() -
-
-
-
-
- Number -
-
-
-
- Related to EditSession.moveLinesDown -
Shifts all the selected lines down one row.
- -Shifts all the selected lines down one row.
- --
Returns
| Number | On success, it returns -1. |
-
-
-
-
-
-
- Editor.moveLinesUp() -
-
-
-
-
- Number -
-
-
-
- Related to EditSession.moveLinesUp -
Shifts all the selected lines up one row.
- -Shifts all the selected lines up one row.
- --
Returns
| Number | On success, it returns -1. |
-
-
- Related to EditSession.moveText -
Moves a range of text from the given range to the given position. toPosition is an object that looks like this:
Moves a range of text from the given range to the given position. toPosition is an object that looks like this:
{ first: range.start.row, last: range.end.row }
+- Editor.$getVisibleRowCount()
Returns the number of currently visibile rows.
+Returns the number of currently visibile rows.
+- Editor.$highlightBrackets()
- Internal
- Editor.$moveLines(Function mover)
Executes a specific function, which can be anything that manipulates selected lines, such as copying them, duplicating them, or shifting them.
+Executes a specific function, which can be anything that manipulates selected lines, such as copying them, duplicating them, or shifting them.
+Arguments
| mover | Function | Required. A method to call on each selected row |
- Editor.$updateHighlightActiveLine()
- Internal
- Editor.blockOutdent()
- Related to EditSession.outdentRows
Outdents the current line.
+Outdents the current line.
+- Editor.blur()
Blurs the current textInput.
Blurs the current textInput.
- Editor.centerSelection()
Attempts to center the current selection on the screen.
+Attempts to center the current selection on the screen.
+- Editor.clearSelection()
- Related to Selection.clearSelection
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
- Editor.copyLinesDown()
- Related to EditSession.duplicateLines
Copies all the selected lines down one row.
+Copies all the selected lines down one row.
+- Editor.copyLinesUp()
- Related to EditSession.duplicateLines
Copies all the selected lines up one row.
+Copies all the selected lines up one row.
+- Editor.destroy()
Cleans up the entire editor.
+Cleans up the entire editor.
+- Editor.exitMultiSelectMode()
- Void
Removes all the selections except the last added one.
+Removes all the selections except the last added one.
+- Related to Search.find
- Related to Editor.find
- Related to Editor.find
- Editor.focus()
Brings the current textInput into focus.
Brings the current textInput into focus.
- Editor.getBehavioursEnabled()
Returns true if the behaviors are currently enabled. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
Returns true if the behaviors are currently enabled. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
- Editor.getCopyText()
Returns the string of text currently highlighted.
+Returns the string of text currently highlighted.
+- Editor.getCursorPosition()
- Related to Selection.getCursor
Gets the current position of the cursor.
+Gets the current position of the cursor.
+- Editor.getCursorPositionScreen()
- Related to EditSession.documentToScreenPosition
Returns the screen position of the cursor.
+Returns the screen position of the cursor.
+- Editor.getDragDelay()
Returns the current mouse drag delay.
+Returns the current mouse drag delay.
+- Editor.getFirstVisibleRow()
- Related to VirtualRenderer.getFirstVisibleRow
Returns the index of the first visible row.
+Returns the index of the first visible row.
+- Editor.getHighlightActiveLine()
Returns true if current lines are always highlighted.
Returns true if current lines are always highlighted.
- Editor.getHighlightSelectedWord()
Returns true if currently highlighted words are to be highlighted.
Returns true if currently highlighted words are to be highlighted.
- Editor.getKeyboardHandler()
- Related to KeyBinding
Returns the keyboard handler.
+Returns the keyboard handler.
+- Editor.getLastSearchOptions()
- Related to Search.getOptions
- Editor.getLastVisibleRow()
- Related to VirtualRenderer.getLastVisibleRow
Returns the index of the last visible row.
+Returns the index of the last visible row.
+- Editor.getOverwrite()
- Related to EditSession.getOverwrite
Returns true if overwrites are enabled; false otherwise.
Returns true if overwrites are enabled; false otherwise.
- Editor.getPrintMarginColumn()
Returns the column number of where the print margin is.
+Returns the column number of where the print margin is.
+- Editor.getReadOnly()
Returns true if the editor is set to read-only mode.
Returns true if the editor is set to read-only mode.
- Editor.getScrollSpeed()
Returns the value indicating how fast the mouse scroll speed is.
+Returns the value indicating how fast the mouse scroll speed is.
+- Editor.getSelection()
Returns the currently highlighted selection.
+Returns the currently highlighted selection.
+- Editor.getSelectionRange()
- Related to Selection.getRange
- Editor.getSelectionStyle()
Returns the current selection style.
+Returns the current selection style.
+- Editor.getSession()
Returns the current session being used.
+Returns the current session being used.
+- Editor.getShowFoldWidgets()
Returns true if the fold widgets are shown.
Returns true if the fold widgets are shown.
- Editor.getShowInvisibles()
Returns true if invisible characters are being shown.
Returns true if invisible characters are being shown.
- Editor.getShowPrintMargin()
Returns true if the print margin is being shown.
Returns true if the print margin is being shown.
- Editor.getTheme()
- Related to VirtualRenderer.getTheme
Returns the path of the current theme.
+Returns the path of the current theme.
+- Editor.getValue()
- Related to EditSession.getValue
Returns the current session's content.
+Returns the current session's content.
+Moves the cursor to the specified line number, and also into the indiciated column.
+Moves the cursor to the specified line number, and also into the indiciated column.
+- Editor.gotoPageDown()
Shifts the document to wherever "page down" is, as well as moving the cursor position.
+Shifts the document to wherever "page down" is, as well as moving the cursor position.
+- Editor.gotoPageUp()
Shifts the document to wherever "page up" is, as well as moving the cursor position.
+Shifts the document to wherever "page up" is, as well as moving the cursor position.
+- Editor.indent()
- Related to EditSession.indentRows
Indents the current line.
+Indents the current line.
+- Editor.isFocused()
Returns true if the current textInput is in focus.
Returns true if the current textInput is in focus.
- Editor.jumpToMatching()
Moves the cursor's row and column to the next matching bracket.
+Moves the cursor's row and column to the next matching bracket.
+- Related to Selection.moveCursorTo
Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
+Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
+- Editor.moveCursorToPosition(Object pos)
- Related to Selection.moveCursorToPosition
Moves the cursor to the position indicated by pos.row and pos.column.
Moves the cursor to the position indicated by pos.row and pos.column.
Arguments
| pos | Object | Required. An object with two properties, row and column |
- Editor.moveLinesDown()
- Related to EditSession.moveLinesDown
Shifts all the selected lines down one row.
+Shifts all the selected lines down one row.
+- Editor.moveLinesUp()
- Related to EditSession.moveLinesUp
Shifts all the selected lines up one row.
+Shifts all the selected lines up one row.
+- Related to EditSession.moveText
Moves a range of text from the given range to the given position. toPosition is an object that looks like this:
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 }
- -- -
-
-
-
-
-
-
- Editor.navigateDown(Number times) -
-
-
-
Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
- -Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
- --
Arguments
| times | Number | Required. The number of times to change navigation |
-
-
-
-
-
-
- Editor.navigateFileEnd() -
-
-
-
Moves the cursor to the end of the current file. Note that this does de-select the current selection.
- -Moves the cursor to the end of the current file. Note that this does de-select the current selection.
- --
-
-
-
-
-
-
- Editor.navigateFileStart() -
-
-
-
Moves the cursor to the start of the current file. Note that this does de-select the current selection.
- -Moves the cursor to the start of the current file. Note that this does de-select the current selection.
- --
-
-
-
-
-
-
- Editor.navigateLeft(Number times) -
-
-
-
Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
- -Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
- --
Arguments
| times | Number | Required. The number of times to change navigation |
-
-
-
-
-
-
- Editor.navigateLineEnd() -
-
-
-
Moves the cursor to the end of the current line. Note that this does de-select the current selection.
- -Moves the cursor to the end of the current line. Note that this does de-select the current selection.
- --
-
-
-
-
-
-
- Editor.navigateLineStart() -
-
-
-
Moves the cursor to the start of the current line. Note that this does de-select the current selection.
- -Moves the cursor to the start of the current line. Note that this does de-select the current selection.
- --
-
-
-
-
-
-
- Editor.navigateRight(Number times) -
-
-
-
Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
- -Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
- --
Arguments
| times | Number | Required. The number of times to change navigation |
-
-
-
-
-
-
-
- Related to Editor.moveCursorTo -
-
Moves the cursor to the specified row and column. Note that this does de-select the current selection.
- -Moves the cursor to the specified row and column. Note that this does de-select the current selection.
- -- -
-
-
-
-
-
-
- Editor.navigateUp(Number times) -
-
-
-
Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
- -Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
- --
Arguments
| times | Number | Required. The number of times to change navigation |
-
-
-
-
-
-
- Editor.navigateWordLeft() -
-
-
-
Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
- -Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
- --
-
-
-
-
-
-
- Editor.navigateWordRight() -
-
-
-
Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
- -Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
- --
-
-
-
-
-
-
- Editor.removeSelectionMarker(Range range) -
-
-
-
Removes the selection marker.
- -Removes the selection marker.
- --
Arguments
| range | Range | Required. The selection range added with addSelectionMarker. |
Finds the next occurence of text in an active selection and adds it to the selections.
- -Finds the next occurence of text in an active selection and adds it to the selections.
- -- -
-
-
-
-
-
-
- Editor.onCopy() -
-
-
-
Called whenever a text "copy" happens.
- -Called whenever a text "copy" happens.
- --
-
-
-
-
-
-
- Editor.onCut() -
-
-
-
called whenever a text "cut" happens.
- -called whenever a text "cut" happens.
- --
-
-
-
-
-
-
- Editor.onPaste() -
-
-
-
called whenever a text "paste" happens.
- -called whenever a text "paste" happens.
- --
-
-
-
-
-
-
- Editor.redo() -
-
-
- Related to UndoManager.redo -
-
{:UndoManager.redo}
- -{:UndoManager.redo}
- --
-
-
-
-
-
-
- Editor.remove(String dir) -
-
-
-
Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
- -Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
- --
Arguments
| dir | String | Required. The direction of the deletion to occur, either "left" or "right" |
-
-
-
-
-
-
- Editor.removeLines() -
-
-
- Related to EditSession.remove -
-
Removes all the lines in the current selection
- -Removes all the lines in the current selection
- --
-
-
-
-
-
-
- Editor.removeToLineEnd() -
-
-
-
Removes all the words to the right of the current selection, until the end of the line.
- -Removes all the words to the right of the current selection, until the end of the line.
- --
-
-
-
-
-
-
- Editor.removeToLineStart() -
-
-
-
Removes all the words to the left of the current selection, until the start of the line.
- -Removes all the words to the left of the current selection, until the start of the line.
- --
-
-
-
-
-
-
- Editor.removeWordLeft() -
-
-
-
Removes the word directly to the left of the current selection.
- -Removes the word directly to the left of the current selection.
- --
-
-
-
-
-
-
- Editor.removeWordRight() -
-
-
-
Removes the word directly to the right of the current selection.
- -Removes the word directly to the right of the current selection.
- --
-
-
-
-
-
-
- Editor.resize() -
-
-
- Related to VirtualRenderer.onResize -
-
{:VirtualRenderer.onResize}
- -{:VirtualRenderer.onResize}
- --
-
-
-
-
-
-
- Editor.scrollPageDown() -
-
-
-
Scrolls the document to wherever "page down" is, without changing the cursor position.
- -Scrolls the document to wherever "page down" is, without changing the cursor position.
- --
-
-
-
-
-
-
- Editor.scrollPageUp() -
-
-
-
Scrolls the document to wherever "page up" is, without changing the cursor position.
- -Scrolls the document to wherever "page up" is, without changing the cursor position.
- --
-
-
-
-
-
-
-
- Related to VirtualRenderer.scrollToLine -
-
TODO scrolls a to line, if center == true, puts line in middle of screen or attempts to)
- -TODO scrolls a to line, if center == true, puts line in middle of screen or attempts to)
- -- -
-
-
-
-
-
-
- Editor.scrollToRow(Number row) -
-
-
- Related to VirtualRenderer.scrollToRow -
-
Moves the editor to the specified row.
- -Moves the editor to the specified row.
- --
Arguments
| row | Number | Required. The row to move to |
-
-
-
-
-
-
- Editor.selectAll() -
-
-
- Related to Selection.selectAll -
-
Selects all the text in editor.
- -Selects all the text in editor.
- --
-
-
-
-
-
-
- Editor.selectPageDown() -
-
-
-
Selects the text from the current position of the document until where a "page down" finishes.
- -Selects the text from the current position of the document until where a "page down" finishes.
- --
-
-
-
-
-
-
- Editor.selectPageUp() -
-
-
-
Selects the text from the current position of the document until where a "page up" finishes.
- -Selects the text from the current position of the document until where a "page up" finishes.
- --
-
-
-
-
-
-
- Editor.setBehavioursEnabled(Boolean enabled) -
-
-
-
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}
- -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}
- --
Arguments
| enabled | Boolean | Required. Enables or disables behaviors |
-
-
-
-
-
-
- Editor.setHighlightActiveLine(Boolean shouldHighlight) -
-
-
-
Determines whether or not the current line should be highlighted.
- -Determines whether or not the current line should be highlighted.
- --
Arguments
| shouldHighlight | Boolean | Required. Set to true to highlight the current line |
-
-
-
-
-
-
- Editor.setHighlightSelectedWord(Boolean shouldHighlight) -
-
-
-
Determines if the currently selected word should be highlighted.
- -Determines if the currently selected word should be highlighted.
- --
Arguments
| shouldHighlight | Boolean | Required. Set to true to highlight the currently selected word |
-
-
-
-
-
-
- Editor.setKeyboardHandler(keyboardHandler) -
-
-
-
Sets a new keyboard handler.
- -Sets a new keyboard handler.
- --
-
-
-
-
-
-
- Editor.setOverwrite(Boolean overwrite) -
-
-
- Related to EditSession.setOverwrite -
-
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 emites the changeOverwrite event.
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 emites the changeOverwrite event.
-
Arguments
| overwrite | Boolean | Required. Defines wheter or not to set overwrites |
-
-
-
-
-
-
- Editor.setReadOnly(Boolean readOnly) -
-
-
-
If readOnly is true, then the editor is set to read-only mode, and none of the content can change.
If readOnly is true, then the editor is set to read-only mode, and none of the content can change.
-
Arguments
| readOnly | Boolean | Required. Specifies whether the editor can be modified or not |
-
-
-
-
-
-
- Editor.setSelectionStyle(String style) -
-
-
-
Indicates how selections should occur. By default, selections are set to "line". This function also emits the 'changeSelectionStyle' event.
Indicates how selections should occur. By default, selections are set to "line". This function also emits the 'changeSelectionStyle' event.
-
Arguments
| style | String | Required. The new selection style |
-
-
-
-
-
-
- Editor.setSession(EditSession session) -
-
-
-
Sets a new editsession to use. This method also emits the 'changeSession' event.
Sets a new editsession to use. This method also emits the 'changeSession' event.
-
Arguments
| session | EditSession | Required. The new session to use |
-
-
-
-
-
-
- Editor.setShowInvisibles(Boolean showInvisibles) -
-
-
-
If showInvisibiles is set to true, invisible characters—like spaces or new lines—are show in the editor.
If showInvisibiles is set to true, invisible characters—like spaces or new lines—are show in the editor.
-
Arguments
| showInvisibles | Boolean | Required. Specifies whether or not to show invisible characters |
-
-
-
-
-
-
- Editor.setShowPrintMargin(Boolean showPrintMargin) -
-
-
-
If showPrintMargin is set to true, the print margin is shown in the editor.
If showPrintMargin is set to true, the print margin is shown in the editor.
-
Arguments
| showPrintMargin | Boolean | Required. Specifies whether or not to show the print margin |
-
-
-
-
-
-
- Editor.setStyle(style) -
-
-
- Related to VirtualRenderer.setStyle -
-
{:VirtualRenderer.setStyle}
- -{:VirtualRenderer.setStyle}
- --
-
-
-
-
-
-
- Editor.setTheme(theme) -
-
-
-
{:VirtualRenderer.setTheme}
- -{:VirtualRenderer.setTheme}
- --
-
-
- Related to Document.setValue -
-
-
-
-
-
-
- Editor.splitLine() -
-
-
-
Splits the line at the current selection (by inserting an '\n').
Splits the line at the current selection (by inserting an '\n').
-
-
-
-
-
-
-
- Editor.toggleCommentLines() -
-
-
-
Given the currently selected range, this function either comments all lines or uncomments all lines (depending on whether it's commented or not).
- -Given the currently selected range, this function either comments all lines or uncomments all lines (depending on whether it's commented or not).
- --
-
-
-
-
-
-
- Editor.toggleOverwrite() -
-
-
- Related to EditSession.toggleOverwrite -
-
Sets the value of overwrite to the opposite of whatever it currently is.
- -Sets the value of overwrite to the opposite of whatever it currently is.
- --
-
-
-
-
-
-
- Editor.toLowerCase() -
-
-
-
Converts the current selection entirely into lowercase.
- -Converts the current selection entirely into lowercase.
- --
-
-
-
-
-
-
- Editor.toUpperCase() -
-
-
-
Converts the current selection entirely into uppercase.
- -Converts the current selection entirely into uppercase.
- --
-
-
-
-
-
-
- Editor.transposeLetters() -
-
-
-
Transposes current line.
- -Transposes current line.
- --
-
-
-
-
-
-
- Editor.undo() -
-
-
- Related to UndoManager.undo -
-
{:UndoManager.undo}
- -{:UndoManager.undo}
- --
-
-
-
-
-
-
- Editor.unsetStyle(style) -
-
-
- Related to VirtualRenderer.unsetStyle -
-
{:VirtualRenderer.unsetStyle}
- -{:VirtualRenderer.unsetStyle}
- --
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-- Editor.navigateDown(Number times)
Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
+Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
+Arguments
| times | Number | Required. The number of times to change navigation |
- Editor.navigateFileEnd()
Moves the cursor to the end of the current file. Note that this does de-select the current selection.
+Moves the cursor to the end of the current file. Note that this does de-select the current selection.
+- Editor.navigateFileStart()
Moves the cursor to the start of the current file. Note that this does de-select the current selection.
+Moves the cursor to the start of the current file. Note that this does de-select the current selection.
+- Editor.navigateLeft(Number times)
Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
+Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
+Arguments
| times | Number | Required. The number of times to change navigation |
- Editor.navigateLineEnd()
Moves the cursor to the end of the current line. Note that this does de-select the current selection.
+Moves the cursor to the end of the current line. Note that this does de-select the current selection.
+- Editor.navigateLineStart()
Moves the cursor to the start of the current line. Note that this does de-select the current selection.
+Moves the cursor to the start of the current line. Note that this does de-select the current selection.
+- Editor.navigateRight(Number times)
Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
+Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
+Arguments
| times | Number | Required. The number of times to change navigation |
- Related to Editor.moveCursorTo
- Editor.navigateUp(Number times)
Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
+Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
+Arguments
| times | Number | Required. The number of times to change navigation |
- Editor.navigateWordLeft()
Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
+Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
+- Editor.navigateWordRight()
Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
+Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
+- Editor.onCopy()
Called whenever a text "copy" happens.
+Called whenever a text "copy" happens.
+- Editor.onCut()
called whenever a text "cut" happens.
+called whenever a text "cut" happens.
+- Editor.onPaste()
called whenever a text "paste" happens.
+called whenever a text "paste" happens.
+- Editor.redo()
- Related to UndoManager.redo
Perform a redo operation on the document, reimplementing the last change.
+Perform a redo operation on the document, reimplementing the last change.
+- Editor.remove(String dir)
Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
+Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
+Arguments
| dir | String | Required. The direction of the deletion to occur, either "left" or "right" |
- Editor.removeLines()
- Related to EditSession.remove
Removes all the lines in the current selection
+Removes all the lines in the current selection
+- Editor.removeSelectionMarker(Range range)
Removes the selection marker.
+Removes the selection marker.
+Arguments
| range | Range | Required. The selection range added with addSelectionMarker. |
- Editor.removeToLineEnd()
Removes all the words to the right of the current selection, until the end of the line.
+Removes all the words to the right of the current selection, until the end of the line.
+- Editor.removeToLineStart()
Removes all the words to the left of the current selection, until the start of the line.
+Removes all the words to the left of the current selection, until the start of the line.
+- Editor.removeWordLeft()
Removes the word directly to the left of the current selection.
+Removes the word directly to the left of the current selection.
+- Editor.removeWordRight()
Removes the word directly to the right of the current selection.
+Removes the word directly to the right of the current selection.
+- Editor.resize()
- Related to VirtualRenderer.onResize
Triggers a resize of the editor.
+Triggers a resize of the editor.
+- Editor.scrollPageDown()
Scrolls the document to wherever "page down" is, without changing the cursor position.
+Scrolls the document to wherever "page down" is, without changing the cursor position.
+- Editor.scrollPageUp()
Scrolls the document to wherever "page up" is, without changing the cursor position.
+Scrolls the document to wherever "page up" is, without changing the cursor position.
+- Related to VirtualRenderer.scrollToLine
TODO scrolls a to line, if center == true, puts line in middle of screen or attempts to)
+TODO scrolls a to line, if center == true, puts line in middle of screen or attempts to)
+- Editor.scrollToRow(Number row)
- Related to VirtualRenderer.scrollToRow
Moves the editor to the specified row.
+Moves the editor to the specified row.
+Arguments
| row | Number | Required. The row to move to |
- Editor.selectAll()
- Related to Selection.selectAll
Selects all the text in editor.
+Selects all the text in editor.
+Finds the next occurence of text in an active selection and adds it to the selections.
+Finds the next occurence of text in an active selection and adds it to the selections.
+- Editor.selectPageDown()
Selects the text from the current position of the document until where a "page down" finishes.
+Selects the text from the current position of the document until where a "page down" finishes.
+- Editor.selectPageUp()
Selects the text from the current position of the document until where a "page up" finishes.
+Selects the text from the current position of the document until where a "page up" finishes.
+- Editor.setBehavioursEnabled(Boolean enabled)
Specifies whether to use behaviors or not. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
+Specifies whether to use behaviors or not. "Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.
+Arguments
| enabled | Boolean | Required. Enables or disables behaviors |
- Editor.setKeyboardHandler(keyboardHandler)
Sets a new keyboard handler.
+Sets a new keyboard handler.
+- Editor.setOverwrite(Boolean overwrite)
- Related to EditSession.setOverwrite
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 emites the changeOverwrite event.
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 emites the changeOverwrite event.
Arguments
| overwrite | Boolean | Required. Defines wheter or not to set overwrites |
- Editor.setReadOnly(Boolean readOnly)
If readOnly is true, then the editor is set to read-only mode, and none of the content can change.
If readOnly is true, then the editor is set to read-only mode, and none of the content can change.
Arguments
| readOnly | Boolean | Required. Specifies whether the editor can be modified or not |
- Editor.setSelectionStyle(String style)
Indicates how selections should occur. By default, selections are set to "line". This function also emits the 'changeSelectionStyle' event.
Indicates how selections should occur. By default, selections are set to "line". This function also emits the 'changeSelectionStyle' event.
Arguments
| style | String | Required. The new selection style |
- Editor.setSession(EditSession session)
Sets a new editsession to use. This method also emits the 'changeSession' event.
Sets a new editsession to use. This method also emits the 'changeSession' event.
Arguments
| session | EditSession | Required. The new session to use |
- Editor.setShowInvisibles(Boolean showInvisibles)
If showInvisibiles is set to true, invisible characters—like spaces or new lines—are show in the editor.
If showInvisibiles is set to true, invisible characters—like spaces or new lines—are show in the editor.
Arguments
| showInvisibles | Boolean | Required. Specifies whether or not to show invisible characters |
- Editor.setStyle(style)
- Related to VirtualRenderer.setStyle
Adds a new class, style, to the editor.
Adds a new class, style, to the editor.
- Editor.setTheme(theme)
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
- Related to Document.setValue
- Editor.splitLine()
Splits the line at the current selection (by inserting an '\n').
Splits the line at the current selection (by inserting an '\n').
- Editor.toggleCommentLines()
Given the currently selected range, this function either comments all lines or uncomments all lines (depending on whether it's commented or not).
+Given the currently selected range, this function either comments all lines or uncomments all lines (depending on whether it's commented or not).
+- Editor.toggleOverwrite()
- Related to EditSession.toggleOverwrite
Sets the value of overwrite to the opposite of whatever it currently is.
+Sets the value of overwrite to the opposite of whatever it currently is.
+- Editor.toLowerCase()
Converts the current selection entirely into lowercase.
+Converts the current selection entirely into lowercase.
+- Editor.toUpperCase()
Converts the current selection entirely into uppercase.
+Converts the current selection entirely into uppercase.
+- Editor.transposeLetters()
Transposes current line.
+Transposes current line.
+- Editor.undo()
- Related to UndoManager.undo
Perform an undo operation on the document, reverting the last change. Returns the range of the undo.
+Perform an undo operation on the document, reverting the last change. Returns the range of the undo.
+- Editor.unsetStyle(style)
- Related to VirtualRenderer.unsetStyle
Removes the class style from the editor.
Removes the class style from the editor.
- Editor.updateSelectionMarkers()
Updates the cursor and marker layers.
+Updates the cursor and marker layers.
+About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Ace API Reference
+Ace API Reference
Welcome to the Ace API Reference Guide. Ace is a standalone code editor written in JavaScript that you can embed onto any website. We're used in a bunch of places already, like GitHub, Google, and Facebook.
On the left, you'll find a list of all of our currently documented classes. There are plenty more to do, but these represent the "core" set. For more information on how to work with Ace, check out the main Ace website.
+About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
--
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
PlaceHolder[edit] -
--
-
- Events (2)
-
-
-
- onCursorChange - -
- onUpdate - -
- - Constructors (1)
-
-
-
- new - -
- - Functions (5)
-
-
-
- cancel - -
- detach - -
- hideOtherMarkers - -
- setup - -
- showOtherMarkers - -
- - - -
- - -
- - -
- - -
TODO
+TODO
+Constructors
Events
- PlaceHolder.on("onCursorChange", function(e))
Emitted when the cursor changes.
+Emitted when the cursor changes.
+- PlaceHolder.on("onUpdate", function(e))
Emitted when the place holder updates.
+Emitted when the place holder updates.
+Methods
- PlaceHolder.cancel()
TODO
+TODO
+- PlaceHolder.detach()
TODO
+TODO
+- PlaceHolder.hideOtherMarkers()
Hides all over markers in the EditSession that are not the currently selected one.
+Hides all over markers in the EditSession that are not the currently selected one.
+- PlaceHolder.setup()
TODO
+TODO
+- PlaceHolder.showOtherMarkers()
TODO
+TODO
+About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Range[edit] -
--
-
- - -
- Constructors (1)
-
-
-
- new - -
- - Functions (25)
-
-
-
- clipRows - -
- clone - -
- collapseRows - -
- compare - -
- compareEnd - -
- compareInside - -
- comparePoint - -
- compareRange - -
- compareStart - -
- contains - -
- containsRange - -
- extend - -
- fromPoints - -
- inside - -
- insideEnd - -
- insideStart - -
- intersects - -
- isEnd - -
- isEqual - -
- isMultiLine - -
- isStart - -
- setEnd - -
- setStart - -
- toScreenRange - -
- toString - -
- - - -
- - -
- - -
- - -
This object is used in various places to indicate a region within the editor. To better visualize how this works, imagine a rectangle. Each quadrant of the rectangle is analogus to a range, as ranges contain a starting row and starting column, and an ending row, and ending column.
- -Constructors
-Creates a new Range object with the given starting and ending row and column points.
Creates a new Range object with the given starting and ending row and column points.
- -
Methods
-Returns the part of the current Range that occurs within the boundaries of firstRow and lastRow as a new Range object.
Returns the part of the current Range that occurs within the boundaries of firstRow and lastRow as a new Range object.
- -
-
-
-
-
-
-
- Range.clone() -
-
-
-
-
- Range -
-
-
-
Returns a duplicate of the calling range.
- -Returns a duplicate of the calling range.
- --
-
-
-
-
-
-
- Range.collapseRows() -
-
-
-
-
- Range -
-
-
-
Returns a range containing the starting and ending rows of the original range, but with a column value of 0.
Returns a range containing the starting and ending rows of the original range, but with a column value of 0.
-
Checks the row and column points with the row and column points of the calling range.
- -Checks the row and column points with the row and column points of the calling range.
- --
Arguments
| row | Number | Required. A row point to compare with |
| column | Number | Required. A column point to compare with |
Returns
| Number | This method returns one of the following numbers:0 if the two points are exactly equal -1 if p.row is less then the calling range 1 if p.row is greater than the calling range If the starting row of the calling range is equal to p.row, and: p.column is greater than or equal to the calling range's starting column, this returns 0Otherwise, it returns -1 If the ending row of the calling range is equal to p.row, and: p.column is less than or equal to the calling range's ending column, this returns 0 Otherwise, it returns 1 |
Checks the row and column points with the row and column points of the calling range.
- -Checks the row and column points with the row and column points of the calling range.
- --
Arguments
| row | Number | Required. A row point to compare with |
| column | Number | Required. A column point to compare with |
Returns
| Number | This method returns one of the following numbers:0 if the two points are exactly equal-1 if p.row is less then the calling range1 if p.row is greater than the calling range, or if isEnd is true.<br/> <br/> If the starting row of the calling range is equal to p.row, and:<br/> p.column is greater than or equal to the calling range's starting column, this returns 0<br/> Otherwise, it returns -1<br/> <br/> If the ending row of the calling range is equal to p.row, and:<br/> p.column is less than or equal to the calling range's ending column, this returns 0`Otherwise, it returns 1 |
Checks the row and column points with the row and column points of the calling range.
- -Checks the row and column points with the row and column points of the calling range.
- --
Arguments
| row | Number | Required. A row point to compare with |
| column | Number | Required. A column point to compare with |
Returns
| Number | This method returns one of the following numbers:1 if the ending row of the calling range is equal to row, and the ending column of the calling range is equal to column-1 if the starting row of the calling range is equal to row, and the starting column of the calling range is equal to columnOtherwise, it returns the value after calling compare. |
-
-
- Related to Range.compare -
Checks the row and column points of p with the row and column points of the calling range.
Checks the row and column points of p with the row and column points of the calling range.
-
Arguments
| p | Range | Required. A point to compare with |
Returns
| Number | This method returns one of the following numbers:0 if the two points are exactly equal-1 if p.row is less then the calling range1 if p.row is greater than the calling rangeIf the starting row of the calling range is equal to p.row, and:p.column is greater than or equal to the calling range's starting column, this returns 0Otherwise, it returns -1 If the ending row of the calling range is equal to p.row, and:p.column is less than or equal to the calling range's ending column, this returns 0Otherwise, it returns 1 |
-
-
- Related to Range.compare -
Compares this range (A) with another range (B).
Compares this range (A) with another range (B).
-
Arguments
| range | Range | Required. A range to compare with |
Returns
| Number | This method returns one of the following numbers:-2: (B) is in front of (A), and doesn't intersect with (A)-1: (B) begins before (A) but ends inside of (A)0: (B) is completely inside of (A) OR (A) is completely inside of (B)+1: (B) begins inside of (A) but ends outside of (A)+2: (B) is after (A) and doesn't intersect with (A)42: FTW state: (B) ends in (A) but starts outside of (A) |
Checks the row and column points with the row and column points of the calling range.
- -Checks the row and column points with the row and column points of the calling range.
- --
Arguments
| row | Number | Required. A row point to compare with |
| column | Number | Required. A column point to compare with |
Returns
| Number | This method returns one of the following numbers:0 if the two points are exactly equal-1 if p.row is less then the calling range1 if p.row is greater than the calling range, or if isStart is true.If the starting row of the calling range is equal to p.row, and:p.column is greater than or equal to the calling range's starting column, this returns 0Otherwise, it returns -1 If the ending row of the calling range is equal to p.row, and:p.column is less than or equal to the calling range's ending column, this returns 0Otherwise, it returns 1 |
-
-
- Related to Range.compare -
Returns true if the row and column provided are within the given range. This can better be expressed as returning true if:
Returns true if the row and column provided are within the given range. This can better be expressed as returning true if:
This object is used in various places to indicate a region within the editor. To better visualize how this works, imagine a rectangle. Each quadrant of the rectangle is analogus to a range, as ranges contain a starting row and starting column, and an ending row, and ending column.
+Constructors
Creates a new Range object with the given starting and ending row and column points.
Creates a new Range object with the given starting and ending row and column points.
Methods
Returns the part of the current Range that occurs within the boundaries of firstRow and lastRow as a new Range object.
Returns the part of the current Range that occurs within the boundaries of firstRow and lastRow as a new Range object.
- Range.clone()
Returns a duplicate of the calling range.
+Returns a duplicate of the calling range.
+- Range.collapseRows()
Returns a range containing the starting and ending rows of the original range, but with a column value of 0.
Returns a range containing the starting and ending rows of the original range, but with a column value of 0.
- Related to Range.compare
Checks the row and column points of p with the row and column points of the calling range.
Checks the row and column points of p with the row and column points of the calling range.
Arguments
| p | Range | Required. A point to compare with |
- Related to Range.compare
Compares this range (A) with another range (B).
Compares this range (A) with another range (B).
Arguments
| range | Range | Required. A range to compare with |
- Related to Range.compare
Returns true if the row and column provided are within the given range. This can better be expressed as returning true if:
Returns true if the row and column provided are within the given range. This can better be expressed as returning true if:
this.start.row <= row <= this.end.row && this.start.column <= column <= this.end.column
- --
this.start.row <= row <= this.end.row && +
-
-
-
- Related to Range.comparePoint -
Checks the start and end points of range and compares them to the calling range. Returns true if the range is contained within the caller's range.
Checks the start and end points of range and compares them to the calling range. Returns true if the range is contained within the caller's range.
-
Arguments
| range | Range | Required. A range to compare with |
Changes the row and column points for the calling range for both the starting and ending points. This method returns that range with a new row.
- -Changes the row and column points for the calling range for both the starting and ending points. This method returns that range with a new row.
- -- -
-
-
- Related to Range.compare -
-
-
- Related to Range.compare -
-
-
- Related to Range.compare -
Returns true if passed in range intersects with the one calling this method.
Returns true if passed in range intersects with the one calling this method.
-
Arguments
| range | Range | Required. A range to compare with |
Returns true if the caller's ending row point is the same as row, and if the caller's ending column is the same as column.
Returns true if the caller's ending row point is the same as row, and if the caller's ending column is the same as column.
- -
Returns true if and only if the starting row and column, and ending tow and column, are equivalent to those given by range.
Returns true if and only if the starting row and column, and ending tow and column, are equivalent to those given by range.
-
Arguments
| range | Range | Required. A range to check against |
-
-
-
-
-
-
- Range.isMultiLine() -
-
-
-
-
- Boolean -
-
-
-
Returns true if the range spans across multiple lines.
- -Returns true if the range spans across multiple lines.
- --
Returns true if the caller's starting row point is the same as row, and if the caller's starting column is the same as column.
Returns true if the caller's starting row point is the same as row, and if the caller's starting column is the same as column.
- -
-
-
-
-
-
-
- Range.toScreenRange(EditSession session) -
-
-
-
-
- Range -
-
-
-
Given the current Range, this function converts those starting and ending points into screen positions, and then returns a new Range object.
Given the current Range, this function converts those starting and ending points into screen positions, and then returns a new Range object.
-
Arguments
| session | EditSession | Required. The EditSession to retrieve coordinates from |
-
-
-
-
-
-
- Range.toString() -
-
-
-
-
- String -
-
-
-
- Related to Range.comparePoint
Checks the start and end points of range and compares them to the calling range. Returns true if the range is contained within the caller's range.
Checks the start and end points of range and compares them to the calling range. Returns true if the range is contained within the caller's range.
Arguments
| range | Range | Required. A range to compare with |
Changes the row and column points for the calling range for both the starting and ending points. This method returns that range with a new row.
+Changes the row and column points for the calling range for both the starting and ending points. This method returns that range with a new row.
+- Related to Range.compare
- Related to Range.compare
- Related to Range.compare
Returns true if the caller's ending row point is the same as row, and if the caller's ending column is the same as column.
Returns true if the caller's ending row point is the same as row, and if the caller's ending column is the same as column.
Returns true if and only if the starting row and column, and ending tow and column, are equivalent to those given by range.
Returns true if and only if the starting row and column, and ending tow and column, are equivalent to those given by range.
Arguments
| range | Range | Required. A range to check against |
- Range.isMultiLine()
Returns true if the range spans across multiple lines.
+Returns true if the range spans across multiple lines.
+Returns true if the caller's starting row point is the same as row, and if the caller's starting column is the same as column.
Returns true if the caller's starting row point is the same as row, and if the caller's starting column is the same as column.
- Range.toScreenRange(EditSession session)
Given the current Range, this function converts those starting and ending points into screen positions, and then returns a new Range object.
Given the current Range, this function converts those starting and ending points into screen positions, and then returns a new Range object.
Arguments
| session | EditSession | Required. The EditSession to retrieve coordinates from |
- Range.toString()
Returns a string containing the range's row and column information, given like this:
+Returns a string containing the range's row and column information, given like this:
[start.row/start.column] -> [end.row/end.column]
+[start.row/start.column] -> [end.row/end.column]
+About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
ScrollBar[edit] -
--
-
- Events (1)
-
-
-
- onScroll - -
- - Constructors (1)
-
-
-
- new - -
- - Functions (4)
-
-
-
- getWidth - -
- setHeight - -
- setInnerHeight - -
- setScrollTop - -
- - - -
- - -
- - -
- - -
A set of methods for setting and retrieving the editor's scrollbar.
+A set of methods for setting and retrieving the editor's scrollbar.
+Constructors
- ScrollBar.new(DOMElement parent)
Creates a new ScrollBar. parent is the owner of the scroll bar.
Creates a new ScrollBar. parent is the owner of the scroll bar.
Arguments
| parent | DOMElement | Required. A DOM element |
Events
- ScrollBar.on("onScroll", function())
Emitted when the scroll bar, well, scrolls.
+Emitted when the scroll bar, well, scrolls.
+Methods
- ScrollBar.getWidth()
Returns the width of the scroll bar.
+Returns the width of the scroll bar.
+About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Search[edit] -
--
-
- - -
- Constructors (1)
-
-
-
- new - -
- - Functions (5)
-
-
-
- find - -
- findAll - -
- getOptions - -
- replace - -
- set - -
- - - -
- - -
- - -
- - -
A class designed to handle all sorts of text searches within a Document.
- -Constructors
--
-
-
-
-
-
- new Search() -
-
-
-
Creates a new Search object. The following search options are avaliable:
Creates a new Search object. The following search options are avaliable:
A class designed to handle all sorts of text searches within a Document.
+Constructors
- Search.new()
Creates a new Search object. The following search options are avaliable:
Creates a new Search object. The following search options are avaliable:
- needle: string or regular expression
- backwards: false @@ -173,10 +15,7 @@
- start: Range or position
- skipCurrent: false
-
-
+
- needle: string or regular expression
- backwards: false
- wrap: false @@ -187,211 +26,21 @@
- start: Range or position
- skipCurrent: false
Methods
- Search.$matchIterator(EditSession session)
- Internal
Arguments
| session | EditSession | Required. The session to search with |
- Search.find(EditSession session)
Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
Arguments
| session | EditSession | Required. The session to search with |
- Search.findAll(EditSession session)
- [ Range ]
Searches for all occurances options.needle. If found, this method returns an array of Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
Searches for all occurances options.needle. If found, this method returns an array of Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.
Arguments
| session | EditSession | Required. The session to search with |
- Search.getOptions()
Returns an object containing all the search options.
+Returns an object containing all the search options.
+About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Selection[edit] -
--
-
- - -
- Constructors (1)
-
-
-
- new - -
- - Functions (45)
-
-
-
- addRange - -
- clearSelection - -
- getCursor - -
- getRange - -
- getSelectionAnchor - -
- getSelectionLead - -
- isBackwards - -
- isEmpty - -
- isMultiLine - -
- mergeOverlappingRanges - -
- moveCursorBy - -
- moveCursorDown - -
- moveCursorFileEnd - -
- moveCursorFileStart - -
- moveCursorLeft - -
- moveCursorLineEnd - -
- moveCursorLineStart - -
- moveCursorLongWordLeft - -
- moveCursorLongWordRight - -
- moveCursorRight - -
- moveCursorTo - -
- moveCursorToPosition - -
- moveCursorToScreen - -
- moveCursorUp - -
- rectangularRangeBlock - -
- substractPoint - -
- selectAll - -
- selectAWord - -
- selectDown - -
- selectFileEnd - -
- selectFileStart - -
- selectLeft - -
- selectLine - -
- selectLineEnd - -
- selectLineStart - -
- selectRight - -
- selectTo - -
- selectToPosition - -
- selectUp - -
- selectWord - -
- selectWordLeft - -
- selectWordRight - -
- setSelectionAnchor - -
- setSelectionRange - -
- shiftSelection - -
- - - -
- - -
- - -
- - -
Contains the cursor position and the text selection of an edit session.
+Selection[edit]
- Constructors (1)
- Functions (45)
- addRange
- clearSelection
- getCursor
- getRange
- getSelectionAnchor
- getSelectionLead
- isBackwards
- isEmpty
- isMultiLine
- mergeOverlappingRanges
- moveCursorBy
- moveCursorDown
- moveCursorFileEnd
- moveCursorFileStart
- moveCursorLeft
- moveCursorLineEnd
- moveCursorLineStart
- moveCursorLongWordLeft
- moveCursorLongWordRight
- moveCursorRight
- moveCursorTo
- moveCursorToPosition
- moveCursorToScreen
- moveCursorUp
- rectangularRangeBlock
- selectAll
- selectAWord
- selectDown
- selectFileEnd
- selectFileStart
- selectLeft
- selectLine
- selectLineEnd
- selectLineStart
- selectRight
- selectTo
- selectToPosition
- selectUp
- selectWord
- selectWordLeft
- selectWordRight
- setSelectionAnchor
- setSelectionRange
- shiftSelection
- substractPoint
Contains the cursor position and the text selection of an edit session.
The row/columns used in the selection are in document coordinates representing ths coordinates as thez appear in the document before applying soft wrap and folding.
- -Constructors
--
-
-
-
-
-
- new Selection(EditSession session) -
-
-
-
Creates a new Selection object.
Creates a new Selection object.
-
Arguments
| session | EditSession | Required. The session to use |
Methods
--
-
-
-
-
-
- Selection.clearSelection() -
-
-
-
[Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.]{: #Selection.clearSelection}
[Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.]{: #Selection.clearSelection}
-
-
-
-
-
-
-
- Selection.getCursor() -
-
-
-
-
- Number -
-
-
-
Gets the current position of the cursor.
- -Gets the current position of the cursor.
- --
-
-
-
-
-
-
- Selection.getSelectionAnchor() -
-
-
-
-
- Object -
-
-
-
- Related to Anchor.getPosition -
Returns an object containing the row and column of the calling selection anchor.
Returns an object containing the row and column of the calling selection anchor.
-
-
-
-
-
-
-
- Selection.getSelectionLead() -
-
-
-
-
- Object -
-
-
-
Returns an object containing the row and column of the calling selection lead.
Returns an object containing the row and column of the calling selection lead.
-
-
-
-
-
-
-
- Selection.isBackwards() -
-
-
-
-
- Boolean -
-
-
-
Returns true if the selection is going backwards in the document.
Returns true if the selection is going backwards in the document.
-
-
-
-
-
-
-
- Selection.isEmpty() -
-
-
-
-
- Boolean -
-
-
-
Returns true if the selection is empty.
Returns true if the selection is empty.
-
-
-
-
-
-
-
- Selection.isMultiLine() -
-
-
-
-
- Boolean -
-
-
-
Returns true if the selection is a multi-line.
Returns true if the selection is a multi-line.
-
-
-
-
-
-
-
- Selection.mergeOverlappingRanges() -
-
-
-
Merges overlapping ranges ensuring consistency after changes
- -Merges overlapping ranges ensuring consistency after changes
- --
-
-
-
-
-
-
-
- Related to EditSession.documentToScreenPosition -
-
Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
- -Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
- -- -
-
-
-
-
-
-
- Selection.moveCursorDown() -
-
-
-
Moves the cursor down one row.
- -Moves the cursor down one row.
- --
-
-
-
-
-
-
- Selection.moveCursorFileEnd() -
-
-
-
Moves the cursor to the end of the file.
- -Moves the cursor to the end of the file.
- --
-
-
-
-
-
-
- Selection.moveCursorFileStart() -
-
-
-
Moves the cursor to the start of the file.
- -Moves the cursor to the start of the file.
- --
-
-
-
-
-
-
- Selection.moveCursorLeft() -
-
-
-
Moves the cursor left one column.
- -Moves the cursor left one column.
- --
-
-
-
-
-
-
- Selection.moveCursorLineEnd() -
-
-
-
Moves the cursor to the end of the line.
- -Moves the cursor to the end of the line.
- --
-
-
-
-
-
-
- Selection.moveCursorLineStart() -
-
-
-
Moves the cursor to the start of the line.
- -Moves the cursor to the start of the line.
- --
-
-
-
-
-
-
- Selection.moveCursorLongWordLeft() -
-
-
-
Moves the cursor to the word on the left.
- -Moves the cursor to the word on the left.
- --
-
-
-
-
-
-
- Selection.moveCursorLongWordRight() -
-
-
-
Moves the cursor to the word on the right.
- -Moves the cursor to the word on the right.
- --
-
-
-
-
-
-
- Selection.moveCursorRight() -
-
-
-
Moves the cursor right one column.
- -Moves the cursor right one column.
- --
Moves the cursor to the row and column provided. [If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.]{: #preventUpdateBoolDesc}
Moves the cursor to the row and column provided. [If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.]{: #preventUpdateBoolDesc}
- -
Moves the cursor to the screen position indicated by row and column. {:preventUpdateBoolDesc}
- -Moves the cursor to the screen position indicated by row and column. {:preventUpdateBoolDesc}
- -- -
-
-
-
-
-
-
- Selection.moveCursorUp() -
-
-
-
Moves the cursor up one row.
- -Moves the cursor up one row.
- --
-
-
- - -
-
-
Gets list of ranges composing rectangular block on the screen
- -Gets list of ranges composing rectangular block on the screen
-/ - this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {
- var rectSel = [];
-
- var xBackwards = screenCursor.column < screenAnchor.column;
- if (xBackwards) {
- var startColumn = screenCursor.column;
- var endColumn = screenAnchor.column;
- } else {
- var startColumn = screenAnchor.column;
- var endColumn = screenCursor.column;
- }
-
- var yBackwards = screenCursor.row < screenAnchor.row;
- if (yBackwards) {
- var startRow = screenCursor.row;
- var endRow = screenAnchor.row;
- } else {
- var startRow = screenAnchor.row;
- var endRow = screenCursor.row;
- }
-
- if (startColumn < 0)
- startColumn = 0;
- if (startRow < 0)
- startRow = 0;
-
- if (startRow == endRow)
- includeEmptyLines = true;
-
- for (var row = startRow; row <= endRow; row++) {
- var range = Range.fromPoints(
- this.session.screenToDocumentPosition(row, startColumn),
- this.session.screenToDocumentPosition(row, endColumn)
- );
- if (range.isEmpty()) {
- if (docEnd && isSamePoint(range.end, docEnd))
- break;
- var docEnd = range.end;
- }
- range.cursor = xBackwards ? range.start : range.end;
- rectSel.push(range);
- }
-
- if (yBackwards)
- rectSel.reverse();
-
- if (!includeEmptyLines) {
- var end = rectSel.length - 1;
- while (rectSel[end].isEmpty() && end > 0)
- end--;
- if (end > 0) {
- var start = 0;
- while (rectSel[start].isEmpty())
- start++;
- }
- for (var i = end; i >= start; i--) {
- if (rectSel[i].isEmpty())
- rectSel.splice(i, 1);
- }
- }
-
- return rectSel;
-}; -}).call(Selection.prototype);
-// extend Editor -var Editor = require("./editor").Editor; -(function() {
-/** extension -Editor.updateSelectionMarkers()
-Updates the cursor and marker layers.
- --
/ - this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {
- var rectSel = [];
-
- var xBackwards = screenCursor.column < screenAnchor.column;
- if (xBackwards) {
- var startColumn = screenCursor.column;
- var endColumn = screenAnchor.column;
- } else {
- var startColumn = screenAnchor.column;
- var endColumn = screenCursor.column;
- }
-
- var yBackwards = screenCursor.row < screenAnchor.row;
- if (yBackwards) {
- var startRow = screenCursor.row;
- var endRow = screenAnchor.row;
- } else {
- var startRow = screenAnchor.row;
- var endRow = screenCursor.row;
- }
-
- if (startColumn < 0)
- startColumn = 0;
- if (startRow < 0)
- startRow = 0;
-
- if (startRow == endRow)
- includeEmptyLines = true;
-
- for (var row = startRow; row <= endRow; row++) {
- var range = Range.fromPoints(
- this.session.screenToDocumentPosition(row, startColumn),
- this.session.screenToDocumentPosition(row, endColumn)
- );
- if (range.isEmpty()) {
- if (docEnd && isSamePoint(range.end, docEnd))
- break;
- var docEnd = range.end;
- }
- range.cursor = xBackwards ? range.start : range.end;
- rectSel.push(range);
- }
-
- if (yBackwards)
- rectSel.reverse();
-
- if (!includeEmptyLines) {
- var end = rectSel.length - 1;
- while (rectSel[end].isEmpty() && end > 0)
- end--;
- if (end > 0) {
- var start = 0;
- while (rectSel[start].isEmpty())
- start++;
- }
- for (var i = end; i >= start; i--) {
- if (rectSel[i].isEmpty())
- rectSel.splice(i, 1);
- }
- }
-
- return rectSel;
-}; -}).call(Selection.prototype);
-// extend Editor -var Editor = require("./editor").Editor; -(function() {
-/** extension -Editor.updateSelectionMarkers()
-Updates the cursor and marker layers.
- -Arguments
| screenCursor | Cursor | Required. The cursor to use |
| screenAnchor | Anchor | Required. The anchor to use |
| includeEmptyLins | Boolean | Required. If true, this includes ranges inside the block which are empty due to clipping |
-
-
-
-
-
-
- Selection.selectAll() -
-
-
-
Selects all the text in the document.
- -Selects all the text in the document.
- --
-
-
-
-
-
-
- Selection.selectAWord() -
-
-
- Related to EditSession.getAWordRange -
-
Selects a word, including its right whitespace.
- -Selects a word, including its right whitespace.
- --
-
-
-
-
-
-
- Selection.selectDown() -
-
-
-
Moves the selection down one row.
- -Moves the selection down one row.
- --
-
-
-
-
-
-
- Selection.selectFileEnd() -
-
-
-
Moves the selection to the end of the file.
- -Moves the selection to the end of the file.
- --
-
-
-
-
-
-
- Selection.selectFileStart() -
-
-
-
Moves the selection to the start of the file.
- -Moves the selection to the start of the file.
- --
-
-
-
-
-
-
- Selection.selectLeft() -
-
-
-
Moves the selection left one column.
- -Moves the selection left one column.
- --
-
-
-
-
-
-
- Selection.selectLine() -
-
-
-
Selects the entire line.
- -Selects the entire line.
- --
-
-
-
-
-
-
- Selection.selectLineEnd() -
-
-
-
Moves the selection to the end of the current line.
- -Moves the selection to the end of the current line.
- --
-
-
-
-
-
-
- Selection.selectLineStart() -
-
-
-
Moves the selection to the beginning of the current line.
- -Moves the selection to the beginning of the current line.
- --
-
-
-
-
-
-
- Selection.selectRight() -
-
-
-
Moves the selection right one column.
- -Moves the selection right one column.
- --
-
-
-
-
-
-
- Selection.selectUp() -
-
-
-
Moves the selection up one row.
- -Moves the selection up one row.
- --
-
-
-
-
-
-
- Selection.selectWord() -
-
-
- Related to EditSession.getWordRange -
-
Moves the selection to highlight the entire word.
- -Moves the selection to highlight the entire word.
- --
-
-
-
-
-
-
- Selection.selectWordLeft() -
-
-
-
Moves the selection to the first word on the left.
- -Moves the selection to the first word on the left.
- --
-
-
-
-
-
-
- Selection.selectWordRight() -
-
-
-
Moves the selection to the first word on the right.
- -Moves the selection to the first word on the right.
- --
Sets the row and column position of the anchor. This function also emits the 'changeSelection' event.
Sets the row and column position of the anchor. This function also emits the 'changeSelection' event.
- -
-
-
-
-
-
-
- Selection.shiftSelection(Number columns) -
-
-
-
Shifts the selection up (or down, if isBackwards is true) the given number of columns.
- -Shifts the selection up (or down, if isBackwards is true) the given number of columns.
- --
Arguments
| columns | Number | Required. The number of columns to shift by |
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-Constructors
- Selection.new(EditSession session)
Creates a new Selection object.
Creates a new Selection object.
Arguments
| session | EditSession | Required. The session to use |
Methods
- Selection.clearSelection()
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
Empties the selection (by de-selecting it). This function also emits the 'changeSelection' event.
- Selection.getCursor()
Gets the current position of the cursor.
+Gets the current position of the cursor.
+- Selection.getSelectionAnchor()
- Related to Anchor.getPosition
Returns an object containing the row and column of the calling selection anchor.
Returns an object containing the row and column of the calling selection anchor.
- Selection.getSelectionLead()
Returns an object containing the row and column of the calling selection lead.
Returns an object containing the row and column of the calling selection lead.
- Selection.isBackwards()
Returns true if the selection is going backwards in the document.
Returns true if the selection is going backwards in the document.
- Selection.isEmpty()
Returns true if the selection is empty.
Returns true if the selection is empty.
- Selection.isMultiLine()
Returns true if the selection is a multi-line.
Returns true if the selection is a multi-line.
- Selection.mergeOverlappingRanges()
Merges overlapping ranges ensuring consistency after changes
+Merges overlapping ranges ensuring consistency after changes
+- Related to EditSession.documentToScreenPosition
Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
+Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
+- Selection.moveCursorDown()
Moves the cursor down one row.
+Moves the cursor down one row.
+- Selection.moveCursorFileEnd()
Moves the cursor to the end of the file.
+Moves the cursor to the end of the file.
+- Selection.moveCursorFileStart()
Moves the cursor to the start of the file.
+Moves the cursor to the start of the file.
+- Selection.moveCursorLeft()
Moves the cursor left one column.
+Moves the cursor left one column.
+- Selection.moveCursorLineEnd()
Moves the cursor to the end of the line.
+Moves the cursor to the end of the line.
+- Selection.moveCursorLineStart()
Moves the cursor to the start of the line.
+Moves the cursor to the start of the line.
+- Selection.moveCursorLongWordLeft()
Moves the cursor to the word on the left.
+Moves the cursor to the word on the left.
+- Selection.moveCursorLongWordRight()
Moves the cursor to the word on the right.
+Moves the cursor to the word on the right.
+- Selection.moveCursorRight()
Moves the cursor right one column.
+Moves the cursor right one column.
+Moves the cursor to the row and column provided. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
Moves the cursor to the row and column provided. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
Moves the cursor to the screen position indicated by row and column. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
Moves the cursor to the screen position indicated by row and column. If preventUpdateDesiredColumn is true, then the cursor stays in the same column position as its original point.
- Selection.moveCursorUp()
Moves the cursor up one row.
+Moves the cursor up one row.
+Gets list of ranges composing rectangular block on the screen
+Gets list of ranges composing rectangular block on the screen
+- Selection.selectAll()
Selects all the text in the document.
+Selects all the text in the document.
+- Selection.selectAWord()
- Related to EditSession.getAWordRange
Selects a word, including its right whitespace.
+Selects a word, including its right whitespace.
+- Selection.selectDown()
Moves the selection down one row.
+Moves the selection down one row.
+- Selection.selectFileEnd()
Moves the selection to the end of the file.
+Moves the selection to the end of the file.
+- Selection.selectFileStart()
Moves the selection to the start of the file.
+Moves the selection to the start of the file.
+- Selection.selectLeft()
Moves the selection left one column.
+Moves the selection left one column.
+- Selection.selectLine()
Selects the entire line.
+Selects the entire line.
+- Selection.selectLineEnd()
Moves the selection to the end of the current line.
+Moves the selection to the end of the current line.
+- Selection.selectLineStart()
Moves the selection to the beginning of the current line.
+Moves the selection to the beginning of the current line.
+- Selection.selectRight()
Moves the selection right one column.
+Moves the selection right one column.
+- Selection.selectUp()
Moves the selection up one row.
+Moves the selection up one row.
+- Selection.selectWord()
- Related to EditSession.getWordRange
Moves the selection to highlight the entire word.
+Moves the selection to highlight the entire word.
+- Selection.selectWordLeft()
Moves the selection to the first word on the left.
+Moves the selection to the first word on the left.
+- Selection.selectWordRight()
Moves the selection to the first word on the right.
+Moves the selection to the first word on the right.
+- Selection.shiftSelection(Number columns)
Shifts the selection up (or down, if isBackwards is true) the given number of columns.
+Shifts the selection up (or down, if isBackwards is true) the given number of columns.
+Arguments
| columns | Number | Required. The number of columns to shift by |
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Split.blur[edit] -
--
-
- - -
- - -
- - -
- - -
- - -
- - -
- - -
-
-
-
-
-
-
- Split.blur() -
-
-
-
-
- Void -
-
-
-
- Related to Editor.blur -
Blurs the current editor.
+Constructors
Methods
- Split.blur()
- Void
- Related to Editor.blur
Blurs the current editor.
+Blurs the current editor.
+- Split.focus()
- Void
- Related to Editor.focus
Focuses the current editor.
+Focuses the current editor.
+- Split.getCurrentEditor()
Returns the current editor.
+Returns the current editor.
+- Split.getOrientation()
- Internal
Returns the orientation.
+Returns the orientation.
+- Split.getSplits()
Returns the number of splits.
+Returns the number of splits.
+- Split.resize()
- Void
- Internal
- Split.setFontSize(Number size)
- Void
- Related to Editor.setFontSize
Sets the font size, in pixels, for all the available editors.
+Sets the font size, in pixels, for all the available editors.
+Arguments
| size | Number | Required. The new font size |
- Split.setSession(EditSession session, Number idx)
- Void
- Related to Editor.setSession
Sets a new EditSession for the indicated editor.
+Sets a new EditSession for the indicated editor.
+Arguments
| session | EditSession | Required. The new edit session |
| idx | Number | Required. The editor's index you're interested in |
- Split.setTheme(String theme)
- Void
- Related to Editor.setTheme
Sets a theme for each of the available editors.
+Sets a theme for each of the available editors.
+Arguments
| theme | String | Required. The name of the theme to set |
- Split.UndoManagerProxy()
- Void
- Internal
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
TokenIterator[edit] -
--
-
- - -
- Constructors (1)
-
-
-
- new - -
- - Functions (5)
-
-
-
- getCurrentToken - -
- getCurrentTokenColumn - -
- getCurrentTokenRow - -
- stepBackward - -
- stepForward - -
- - - -
- - -
- - -
- - -
This class provides an essay way to treat the document as a stream of tokens, and provides methods to iterate over these tokens.
+This class provides an essay way to treat the document as a stream of tokens, and provides methods to iterate over these tokens.
+Constructors
- TokenIterator.new(EditSession session, Number initialRow, Number initialColumn)
Creates a new token iterator object. The inital token index is set to the provided row and column coordinates.
+Creates a new token iterator object. The inital token index is set to the provided row and column coordinates.
+Arguments
| session | EditSession | Required. The session to associate with |
| initialRow | Number | Required. The row to start the tokenizing at |
| initialColumn | Number | Required. The column to start the tokenizing at |
Methods
- TokenIterator.getCurrentToken()
Returns the current tokenized string.
+Returns the current tokenized string.
+- TokenIterator.getCurrentTokenColumn()
Returns the current column.
+Returns the current column.
+- TokenIterator.getCurrentTokenRow()
Returns the current row.
+Returns the current row.
+- TokenIterator.stepBackward()
- [ String ]
Tokenizes all the items from the current point to the row prior in the document.
+Tokenizes all the items from the current point to the row prior in the document.
+- TokenIterator.stepForward()
Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns null. Otherwise, it returns the tokenized string.
Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns null. Otherwise, it returns the tokenized string.
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Tokenizer[edit] -
--
-
- - -
- Constructors (1)
-
-
-
- new - -
- - Functions (1)
-
-
-
- getLineTokens - -
- - - -
- - -
- - -
- - -
This class takes a set of highlighting rules, and creates a tokenizer out of them. For more information, see the wiki on extending highlighters.
+This class takes a set of highlighting rules, and creates a tokenizer out of them. For more information, see the wiki on extending highlighters.
+Constructors
Methods
- Tokenizer.getLineTokens()
Returns an object containing two properties: tokens, which contains all the tokens; and state, the current state.
Returns an object containing two properties: tokens, which contains all the tokens; and state, the current state.
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
--
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
UndoManager[edit] -
--
-
- - -
- Constructors (1)
-
-
-
- new - -
- - Functions (6) - - -
- - -
- - -
- - -
- - -
This object maintains the undo stack for an EditSession.
- -Constructors
--
-
-
-
-
-
- new UndoManager() -
-
-
-
Resets the current undo state and creates a new UndoManager.
Resets the current undo state and creates a new UndoManager.
-
Methods
--
-
-
-
-
-
- UndoManager.execute(Object options) -
-
-
-
-
- Void -
-
-
-
Provides a means for implementing your own undo manager. options has one property, args, an undefined, with two elements:
This object maintains the undo stack for an EditSession.
+Constructors
- UndoManager.new()
Resets the current undo state and creates a new UndoManager.
Resets the current undo state and creates a new UndoManager.
Methods
- UndoManager.execute(Object options)
- Void
Provides a means for implementing your own undo manager. options has one property, args, an Array, with two elements:
args[0]is an array of deltasargs[1]is the document to associate with
Provides a means for implementing your own undo manager. options has one property, args, an undefined, with two elements:
Provides a means for implementing your own undo manager. options has one property, args, an Array, with two elements:
args[0]is an array of deltasargs[1]is the document to associate with
Arguments
| options | Object | Required. Contains additional properties |
- UndoManager.hasRedo()
Returns true if there are redo operations left to perform.
Returns true if there are redo operations left to perform.
- UndoManager.hasUndo()
Returns true if there are undo operations left to perform.
Returns true if there are undo operations left to perform.
- UndoManager.reset()
- Void
Destroys the stack of undo and redo redo operations.
+Destroys the stack of undo and redo redo operations.
+Perform an undo operation on the document, reverting the last change. Returns the range of the undo.
+Perform an undo operation on the document, reverting the last change. Returns the range of the undo.
+Arguments
| dontSelect | Boolean | Required. If true, doesn't select the range of where the change occured |
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-
-
- Ace -
- Ace API Reference -
Ace Reference
--
-
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
VirtualRenderer[edit] -
--
-
- - -
- Constructors (1)
-
-
-
- new - -
- - Functions (57)
-
-
-
- addGutterDecoration - -
- adjustWrapLimit - -
- destroy - -
- getAnimatedScroll - -
- getContainerElement - -
- getFirstFullyVisibleRow - -
- getFirstVisibleRow - -
- getHScrollBarAlwaysVisible - -
- getLastFullyVisibleRow - -
- getLastVisibleRow - -
- getMouseEventTarget - -
- getPrintMarginColumn - -
- getScrollBottomRow - -
- getScrollLeft - -
- getScrollTop - -
- getScrollTopRow - -
- getShowGutter - -
- getShowInvisibles - -
- getShowPrintMargin - -
- getTextAreaContainer - -
- getTheme - -
- hideComposition - -
- hideCursor - -
- isScrollableBy - -
- onResize - -
- removeGutterDecoration - -
- scrollBy - -
- scrollCursorIntoView - -
- scrollToLine - -
- scrollToRow - -
- scrollToX - -
- scrollToY - -
- setAnimatedScroll - -
- setAnnotations - -
- setCompositionText - -
- setHScrollBarAlwaysVisible - -
- setPadding - -
- setPrintMarginColumn - -
- setSession - -
- setShowGutter - -
- setShowInvisibles - -
- setShowPrintMargin - -
- setStyle - -
- setTheme - -
- showCursor - -
- textToScreenCoordinates - -
- unsetStyle - -
- updateBackMarkers - -
- updateBreakpoints - -
- updateCursor - -
- updateFontSize - -
- updateFrontMarkers - -
- updateFull - -
- updateLines - -
- updateText - -
- visualizeBlur - -
- visualizeFocus - -
- - - -
- - -
- - -
- - -
The class that is responsible for drawing everything you see on the screen!
- -Constructors
--
-
-
-
-
-
- new VirtualRenderer(DOMElement container, String theme) -
-
-
-
Constructs a new VirtualRenderer within the container specified, applying the given theme.
Constructs a new VirtualRenderer within the container specified, applying the given theme.
-
Arguments
| container | DOMElement | Required. The root element of the editor |
| theme | String | Required. The starting theme |
Methods
--
-
-
-
-
-
- VirtualRenderer.addGutterDecoration(row, className) -
-
-
-
-
- Void -
-
-
-
Deprecated (moved to EditSession)
- -Deprecated (moved to EditSession)
- --
-
-
-
-
-
-
- VirtualRenderer.adjustWrapLimit() -
-
-
-
-
- Void -
-
-
-
Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
- -Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
- --
-
-
-
-
-
-
- VirtualRenderer.destroy() -
-
-
-
Destroys the text and cursor layers for this renderer.
- -Destroys the text and cursor layers for this renderer.
- --
-
-
-
-
-
-
- VirtualRenderer.getAnimatedScroll() -
-
-
-
-
- Boolean -
-
-
-
Returns whether an animated scroll happens or not.
- -Returns whether an animated scroll happens or not.
- --
-
-
-
-
-
-
- VirtualRenderer.getContainerElement() -
-
-
-
-
- DOMElement -
-
-
-
Returns the root element containing this renderer.
- -Returns the root element containing this renderer.
- --
-
-
-
-
-
-
- VirtualRenderer.getFirstFullyVisibleRow() -
-
-
-
-
- Number -
-
-
-
Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
- -Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
- --
-
-
-
-
-
-
- VirtualRenderer.getFirstVisibleRow() -
-
-
-
-
- Number -
-
-
-
[Returns the index of the first visible row.]{: #VirtualRenderer.getFirstVisibleRow}
- -[Returns the index of the first visible row.]{: #VirtualRenderer.getFirstVisibleRow}
- --
-
-
-
-
-
-
- VirtualRenderer.getHScrollBarAlwaysVisible() -
-
-
-
-
- Boolean -
-
-
-
Returns whether the horizontal scrollbar is set to be always visible.
- -Returns whether the horizontal scrollbar is set to be always visible.
- --
-
-
-
-
-
-
- VirtualRenderer.getLastFullyVisibleRow() -
-
-
-
-
- Number -
-
-
-
Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
- -Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
- --
-
-
-
-
-
-
- VirtualRenderer.getLastVisibleRow() -
-
-
-
-
- Number -
-
-
-
[Returns the index of the last visible row.]{: #VirtualRenderer.getLastVisibleRow}
- -[Returns the index of the last visible row.]{: #VirtualRenderer.getLastVisibleRow}
- --
-
-
-
-
-
-
- VirtualRenderer.getMouseEventTarget() -
-
-
-
-
- DOMElement -
-
-
-
Returns the element that the mouse events are attached to
- -Returns the element that the mouse events are attached to
- --
-
-
-
-
-
-
- VirtualRenderer.getPrintMarginColumn() -
-
-
-
-
- Boolean -
-
-
-
Returns whether the print margin column is being shown or not.
- -Returns whether the print margin column is being shown or not.
- --
-
-
-
-
-
-
- VirtualRenderer.getScrollBottomRow() -
-
-
-
-
- Number -
-
-
-
Returns the last visible row, regardless of whether it's fully visible or not.
- -Returns the last visible row, regardless of whether it's fully visible or not.
- --
-
-
-
-
-
-
- VirtualRenderer.getScrollLeft() -
-
-
-
-
- Number -
-
-
-
- Related to EditSession.getScrollLeft -
{:EditSession.getScrollLeft}
- -{:EditSession.getScrollLeft}
- --
-
-
-
-
-
-
- VirtualRenderer.getScrollTop() -
-
-
-
-
- Number -
-
-
-
- Related to EditSession.getScrollTop -
{:EditSession.getScrollTop}
- -{:EditSession.getScrollTop}
- --
-
-
-
-
-
-
- VirtualRenderer.getScrollTopRow() -
-
-
-
-
- Number -
-
-
-
Returns the first visible row, regardless of whether it's fully visible or not.
- -Returns the first visible row, regardless of whether it's fully visible or not.
- --
-
-
-
-
-
-
- VirtualRenderer.getShowGutter() -
-
-
-
-
- Boolean -
-
-
-
Returns true if the gutter is being shown.
Returns true if the gutter is being shown.
-
-
-
-
-
-
-
- VirtualRenderer.getShowInvisibles() -
-
-
-
-
- Boolean -
-
-
-
Returns whether invisible characters are being shown or not.
- -Returns whether invisible characters are being shown or not.
- --
-
-
-
-
-
-
- VirtualRenderer.getShowPrintMargin() -
-
-
-
-
- Boolean -
-
-
-
Returns whetherthe print margin is being shown or not.
- -Returns whetherthe print margin is being shown or not.
- --
-
-
-
-
-
-
- VirtualRenderer.getTextAreaContainer() -
-
-
-
-
- DOMElement -
-
-
-
Returns the element to which the hidden text area is added.
- -Returns the element to which the hidden text area is added.
- --
-
-
-
-
-
-
- VirtualRenderer.getTheme() -
-
-
-
-
- String -
-
-
-
[Returns the path of the current theme.]{: #VirtualRenderer.getTheme}
- -[Returns the path of the current theme.]{: #VirtualRenderer.getTheme}
- --
-
-
-
-
-
-
- VirtualRenderer.hideComposition() -
-
-
-
-
- Void -
-
-
-
Hides the current composition.
- -Hides the current composition.
- --
-
-
-
-
-
-
- VirtualRenderer.hideCursor() -
-
-
-
-
- Void -
-
-
-
Hides the cursor icon.
- -Hides the cursor icon.
- --
Returns true if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line.
Returns true if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line.
- -
-
-
-
-
-
-
- VirtualRenderer.onResize(Boolean force) -
-
-
-
-
- Void -
-
-
-
[Triggers a resize of the editor.]{: #VirtualRenderer.onResize}
- -[Triggers a resize of the editor.]{: #VirtualRenderer.onResize}
- --
Arguments
| force | Boolean | Required. If true, recomputes the size, even if the height and width haven't changed |
-
-
-
-
-
-
- VirtualRenderer.removeGutterDecoration(row, className) -
-
-
-
-
- Void -
-
-
-
Deprecated (moved to EditSession)
- -Deprecated (moved to EditSession)
- --
-
-
-
-
-
-
- VirtualRenderer.scrollCursorIntoView(cursor, offset) -
-
-
-
-
- Void -
-
-
-
Scrolls the cursor into the first visibile area of the editor
- -Scrolls the cursor into the first visibile area of the editor
- --
-
-
- - -
-
-
Gracefully scrolls the editor to the row indicated.
- -Gracefully scrolls the editor to the row indicated.
- -- -
-
-
-
-
-
-
- VirtualRenderer.scrollToRow(Number row) -
-
-
-
-
- Void -
-
-
-
- Related to EditSession.setScrollTop -
Gracefully scrolls the top of the editor to the row indicated.
- -Gracefully scrolls the top of the editor to the row indicated.
- --
Arguments
| row | Number | Required. A row id |
-
-
-
-
-
-
- VirtualRenderer.setAnimatedScroll(Boolean shouldAnimate) -
-
-
-
-
- Void -
-
-
-
Identifies whether you want to have an animated scroll or not.
- -Identifies whether you want to have an animated scroll or not.
- --
Arguments
| shouldAnimate | Boolean | Required. Set to true to show animated scrolls |
-
-
-
-
-
-
- VirtualRenderer.setHScrollBarAlwaysVisible(Boolean alwaysVisible) -
-
-
-
-
- Void -
-
-
-
Identifies whether you want to show the horizontal scrollbar or not.
- -Identifies whether you want to show the horizontal scrollbar or not.
- --
Arguments
| alwaysVisible | Boolean | Required. Set to true to make the horizontal scroll bar visible |
-
-
-
-
-
-
- VirtualRenderer.setPrintMarginColumn(Boolean showPrintMargin) -
-
-
-
Identifies whether you want to show the print margin column or not.
- -Identifies whether you want to show the print margin column or not.
- --
Arguments
| showPrintMargin | Boolean | Required. Set to true to show the print margin column |
-
-
-
-
-
-
- VirtualRenderer.setSession(session) -
-
-
-
-
- Void -
-
-
-
-
-
-
-
-
-
- VirtualRenderer.setShowInvisibles(Boolean showInvisibles) -
-
-
-
-
- Void -
-
-
-
Identifies whether you want to show invisible characters or not.
- -Identifies whether you want to show invisible characters or not.
- --
Arguments
| showInvisibles | Boolean | Required. Set to true to show invisibles |
-
-
-
-
-
-
- VirtualRenderer.setShowPrintMargin(Boolean showPrintMargin) -
-
-
-
Identifies whether you want to show the print margin or not.
- -Identifies whether you want to show the print margin or not.
- --
Arguments
| showPrintMargin | Boolean | Required. Set to true to show the print margin |
-
-
-
-
-
-
- VirtualRenderer.setTheme(String theme) -
-
-
-
-
- Void -
-
-
-
[Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.]{: #VirtualRenderer.setTheme}
[Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.]{: #VirtualRenderer.setTheme}
-
Arguments
| theme | String | Required. The path to a theme |
-
-
-
-
-
-
- VirtualRenderer.showCursor() -
-
-
-
-
- Void -
-
-
-
Shows the cursor icon.
- -Shows the cursor icon.
- --
-
-
-
-
-
-
-
-
- VirtualRenderer.updateBackMarkers() -
-
-
-
-
- Void -
-
-
-
Schedules an update to all the back markers in the document.
- -Schedules an update to all the back markers in the document.
- --
-
-
-
-
-
-
- VirtualRenderer.updateBreakpoints() -
-
-
-
-
- Void -
-
-
-
Redraw breakpoints.
- -Redraw breakpoints.
- --
-
-
-
-
-
-
- VirtualRenderer.updateCursor() -
-
-
-
-
- Void -
-
-
-
Updates the cursor icon.
- -Updates the cursor icon.
- --
-
-
-
-
-
-
- VirtualRenderer.updateFontSize() -
-
-
-
-
- Void -
-
-
-
Updates the font size.
- -Updates the font size.
- --
-
-
-
-
-
-
- VirtualRenderer.updateFrontMarkers() -
-
-
-
-
- Void -
-
-
-
Schedules an update to all the front markers in the document.
- -Schedules an update to all the front markers in the document.
- --
-
-
-
-
-
-
- VirtualRenderer.updateFull() -
-
-
-
-
- Void -
-
-
-
Triggers a full update of all the layers, for all the rows.
- -Triggers a full update of all the layers, for all the rows.
- --
-
-
-
-
-
-
- VirtualRenderer.updateText() -
-
-
-
-
- Void -
-
-
-
Triggers a full update of the text, for all the rows.
- -Triggers a full update of the text, for all the rows.
- --
-
-
-
-
-
-
- VirtualRenderer.visualizeBlur() -
-
-
-
-
- Void -
-
-
-
Blurs the current container.
- -Blurs the current container.
- --
-
-
-
-
-
-
- VirtualRenderer.visualizeFocus() -
-
-
-
-
- Void -
-
-
-
Focuses the current container.
- -Focuses the current container.
- --
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
-VirtualRenderer[edit]
- Constructors (1)
- Functions (58)
- addGutterDecoration
- adjustWrapLimit
- destroy
- getAnimatedScroll
- getContainerElement
- getFirstFullyVisibleRow
- getFirstVisibleRow
- getHScrollBarAlwaysVisible
- getLastFullyVisibleRow
- getLastVisibleRow
- getMouseEventTarget
- getPrintMarginColumn
- getScrollBottomRow
- getScrollLeft
- getScrollTop
- getScrollTopRow
- getShowGutter
- getShowInvisibles
- getShowPrintMargin
- getTextAreaContainer
- getTheme
- hideComposition
- hideCursor
- isScrollableBy
- onResize
- removeGutterDecoration
- scrollBy
- scrollCursorIntoView
- scrollToLine
- scrollToRow
- scrollToX
- scrollToY
- setAnimatedScroll
- setAnnotations
- setCompositionText
- setHScrollBarAlwaysVisible
- setPadding
- setPrintMarginColumn
- setSession
- setShowGutter
- setShowInvisibles
- setShowPrintMargin
- setStyle
- setTheme
- showComposition
- showCursor
- textToScreenCoordinates
- unsetStyle
- updateBackMarkers
- updateBreakpoints
- updateCursor
- updateFontSize
- updateFrontMarkers
- updateFull
- updateLines
- updateText
- visualizeBlur
- visualizeFocus
The class that is responsible for drawing everything you see on the screen!
+Constructors
- VirtualRenderer.new(DOMElement container, String theme)
Constructs a new VirtualRenderer within the container specified, applying the given theme.
Constructs a new VirtualRenderer within the container specified, applying the given theme.
Arguments
| container | DOMElement | Required. The root element of the editor |
| theme | String | Required. The starting theme |
Methods
- VirtualRenderer.addGutterDecoration(row, className)
- Void
Deprecated (moved to EditSession)
+Deprecated (moved to EditSession)
+- VirtualRenderer.adjustWrapLimit()
- Void
Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
+Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
+- VirtualRenderer.destroy()
Destroys the text and cursor layers for this renderer.
+Destroys the text and cursor layers for this renderer.
+- VirtualRenderer.getAnimatedScroll()
Returns whether an animated scroll happens or not.
+Returns whether an animated scroll happens or not.
+- VirtualRenderer.getContainerElement()
Returns the root element containing this renderer.
+Returns the root element containing this renderer.
+- VirtualRenderer.getFirstFullyVisibleRow()
Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
+Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
+- VirtualRenderer.getFirstVisibleRow()
Returns the index of the first visible row.
+Returns the index of the first visible row.
+- VirtualRenderer.getHScrollBarAlwaysVisible()
Returns whether the horizontal scrollbar is set to be always visible.
+Returns whether the horizontal scrollbar is set to be always visible.
+- VirtualRenderer.getLastFullyVisibleRow()
Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
+Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
+- VirtualRenderer.getLastVisibleRow()
Returns the index of the last visible row.
+Returns the index of the last visible row.
+- VirtualRenderer.getMouseEventTarget()
Returns the element that the mouse events are attached to
+Returns the element that the mouse events are attached to
+- VirtualRenderer.getPrintMarginColumn()
Returns whether the print margin column is being shown or not.
+Returns whether the print margin column is being shown or not.
+- VirtualRenderer.getScrollBottomRow()
Returns the last visible row, regardless of whether it's fully visible or not.
+Returns the last visible row, regardless of whether it's fully visible or not.
+- VirtualRenderer.getScrollLeft()
- Related to EditSession.getScrollLeft
Returns the value of the distance between the left of the editor and the leftmost part of the visible content.
+Returns the value of the distance between the left of the editor and the leftmost part of the visible content.
+- VirtualRenderer.getScrollTop()
- Related to EditSession.getScrollTop
Returns the value of the distance between the top of the editor and the topmost part of the visible content.
+Returns the value of the distance between the top of the editor and the topmost part of the visible content.
+- VirtualRenderer.getScrollTopRow()
Returns the first visible row, regardless of whether it's fully visible or not.
+Returns the first visible row, regardless of whether it's fully visible or not.
+- VirtualRenderer.getShowGutter()
Returns true if the gutter is being shown.
Returns true if the gutter is being shown.
- VirtualRenderer.getShowInvisibles()
Returns whether invisible characters are being shown or not.
+Returns whether invisible characters are being shown or not.
+- VirtualRenderer.getShowPrintMargin()
Returns whetherthe print margin is being shown or not.
+Returns whetherthe print margin is being shown or not.
+- VirtualRenderer.getTextAreaContainer()
Returns the element to which the hidden text area is added.
+Returns the element to which the hidden text area is added.
+- VirtualRenderer.getTheme()
Returns the path of the current theme.
+Returns the path of the current theme.
+- VirtualRenderer.hideComposition()
- Void
Hides the current composition.
+Hides the current composition.
+- VirtualRenderer.hideCursor()
- Void
Hides the cursor icon.
+Hides the cursor icon.
+Returns true if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line.
Returns true if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line.
- VirtualRenderer.removeGutterDecoration(row, className)
- Void
Deprecated (moved to EditSession)
+Deprecated (moved to EditSession)
+- VirtualRenderer.scrollCursorIntoView(cursor, offset)
- Void
Scrolls the cursor into the first visibile area of the editor
+Scrolls the cursor into the first visibile area of the editor
+Gracefully scrolls the editor to the row indicated.
+Gracefully scrolls the editor to the row indicated.
+- VirtualRenderer.scrollToRow(Number row)
- Void
- Related to EditSession.setScrollTop
Gracefully scrolls the top of the editor to the row indicated.
+Gracefully scrolls the top of the editor to the row indicated.
+Arguments
| row | Number | Required. A row id |
- VirtualRenderer.setHScrollBarAlwaysVisible(Boolean alwaysVisible)
- Void
Identifies whether you want to show the horizontal scrollbar or not.
+Identifies whether you want to show the horizontal scrollbar or not.
+Arguments
| alwaysVisible | Boolean | Required. Set to true to make the horizontal scroll bar visible |
- VirtualRenderer.setSession(session)
- Void
- VirtualRenderer.setTheme(String theme)
- Void
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
Sets a new theme for the editor. theme should exist, and be a directory path, like ace/theme/textmate.
Arguments
| theme | String | Required. The path to a theme |
- VirtualRenderer.showCursor()
- Void
Shows the cursor icon.
+Shows the cursor icon.
+- VirtualRenderer.updateBackMarkers()
- Void
Schedules an update to all the back markers in the document.
+Schedules an update to all the back markers in the document.
+- VirtualRenderer.updateBreakpoints()
- Void
Redraw breakpoints.
+Redraw breakpoints.
+- VirtualRenderer.updateCursor()
- Void
Updates the cursor icon.
+Updates the cursor icon.
+- VirtualRenderer.updateFontSize()
- Void
Updates the font size.
+Updates the font size.
+- VirtualRenderer.updateFrontMarkers()
- Void
Schedules an update to all the front markers in the document.
+Schedules an update to all the front markers in the document.
+- VirtualRenderer.updateFull()
- Void
Triggers a full update of all the layers, for all the rows.
+Triggers a full update of all the layers, for all the rows.
+- VirtualRenderer.updateText()
- Void
Triggers a full update of the text, for all the rows.
+Triggers a full update of the text, for all the rows.
+- VirtualRenderer.visualizeBlur()
- Void
Blurs the current container.
+Blurs the current container.
+- VirtualRenderer.visualizeFocus()
- Void
Focuses the current container.
+Focuses the current container.
+About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012