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
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'.
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.
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
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
Splits a string of text on any newline (\n) or carriage-return ('\r') characters.
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
Stores all the data about Editor state providing easy way to change editors state. EditSession can be attached to only one Document. Same Document can be attached to several EditSessions.
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.
diff --git a/api/editor.html b/api/editor.html index e739b794..469f7d21 100644 --- a/api/editor.html +++ b/api/editor.html @@ -1,7 +1,7 @@ -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.
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.
diff --git a/api/placeholder.html b/api/placeholder.html index 6d0ce9ab..e28404c8 100644 --- a/api/placeholder.html +++ b/api/placeholder.html @@ -1,7 +1,7 @@ -TODO
+TODO
Constructors
Events
- PlaceHolder.on("onCursorChange", function(e))
Emitted when the cursor changes.
diff --git a/api/range.html b/api/range.html index 9e864f43..d9b83ba5 100644 --- a/api/range.html +++ b/api/range.html @@ -1,7 +1,7 @@ -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.
+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.
Batches changes (that force something to be redrawn) in the background.
+Constructors
- RenderLoop.new(onRender, win)
- Internal
Methods
About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
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.
diff --git a/api/search.html b/api/search.html index 9e72f5e9..7c5662a8 100644 --- a/api/search.html +++ b/api/search.html @@ -1,7 +1,7 @@ -A class designed to handle all sorts of text searches within a Document.
+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:
-
diff --git a/api/selection.html b/api/selection.html
index fcd3fa3d..f2598bc6 100644
--- a/api/selection.html
+++ b/api/selection.html
@@ -1,7 +1,7 @@
-
- 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
- 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
- Selection.new(EditSession session)
- Split.blur()
- Void
- Related to Editor.blur
Selection[edit]
Contains the cursor position and the text selection of an edit session.
+Selection[edit]
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
Creates a new Selection object.
Creates a new Selection object.
Constructors
Methods
Blurs the current editor.
+