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 diff --git a/api/anchor.html b/api/anchor.html index 515c299a..60b23109 100644 --- a/api/anchor.html +++ b/api/anchor.html @@ -1,14 +1,14 @@ -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 ConstructorsEvents
Fires whenever the anchor position changes. -Fires whenever the anchor position changes. + |
Events
- Anchor.on("change", function(Object e))
Fires whenever the anchor position changes.
+Fires whenever the anchor position changes.
Events that can trigger this function include setPosition().
Arguments
| e | Object | Required. An object containing information about the anchor position. It has two properties:
Tokenizes the current Tokenizes the current ConstructorsEventsFires whenever the background tokeniziers between a range of rows are going to be updated. -Fires whenever the background tokeniziers between a range of rows are going to be updated. + |
Events
- BackgroundTokenizer.on("update", function(Object e))
Fires whenever the background tokeniziers between a range of rows are going to be updated.
+Fires whenever the background tokeniziers between a range of rows are going to be updated.
Arguments
| e | Object | Required. An object containing two properties, |
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.
CommandManager[edit]
Constructors
TODO
+CommandManager [edit]
Constructors
TODO
TODO
Arguments
| platform | String | Required. Identifier for the platform; must be either |
| commands | Array | Required. A list of commands diff --git a/api/document.html b/api/document.html index 5d24bf24..696bb268 100644 --- a/api/document.html +++ b/api/document.html @@ -1,31 +1,31 @@ -Contains the text of the document. Document can be attached to several Contains the text of the document. Document can be attached to several ConstructorsEvents
Fires whenever the document changes. -Fires whenever the document changes. + |
Events
- Document.on("change", function(Object e))
Fires whenever the document changes.
+Fires whenever the document changes.
Several methods trigger different "change" events. Below is a list of each action type, followed by each property that's also available:
-
-
"insertLines"(emitted byDocument.insertLines)-
+
"insertLines"(emitted byDocument.insertLines())range: theRangeof the change within the documentlines: the lines in the document that are changing
-"insertText"(emitted byDocument.insertNewLine)-
+
"insertText"(emitted byDocument.insertNewLine())range: theRangeof the change within the documenttext: the text that's being added
-"removeLines"(emitted byDocument.insertLines)-
+
"removeLines"(emitted byDocument.insertLines())range: theRangeof the change within the documentlines: the lines in the document that were removed
-nl: the new line character (as defined byDocument.getNewLineCharacter)
+nl: the new line character (as defined byDocument.getNewLineCharacter())
-"removeText"(emitted byDocument.removeInLineandDocument.removeNewLine)-
+
"removeText"(emitted byDocument.removeInLine()andDocument.removeNewLine())range: theRangeof the change within the documenttext: the text that's being removed
EditSession - Ace API EditSession[edit]
- Events (15)
- 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
+Editorstate providing easy way to change editors state.EditSessioncan be attached to only oneDocument. SameDocumentcan be attached to severalEditSessions.EditSession - Ace API EditSession [edit]
- Events (15)
- 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
EditSessionand associates it with the givenDocumentandTextMode.Sets up a new
EditSessionand associates it with the givenDocumentandTextMode.Arguments
text Document | String Required. If
textis aDocument, it associates theEditSessionwith it. Otherwise, a newDocumentis created, with the initial textmode TextMode Required. The inital language mode to use for the document
-Events
- EditSession.on("change", function(Object e))
Emitted when the document changes.
-Emitted when the document changes.
+Events
- EditSession.on("changeAnnotation", function())
Emitted when an annotation changes, like through
-EditSession.setAnnotations.Emitted when an annotation changes, like through
-EditSession.setAnnotations.- EditSession.on("changeBackMarker", function())
Emitted when a back marker changes.
-Emitted when a back marker changes.
-- EditSession.on("changeBreakpoint", function())
Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
-Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
-- EditSession.on("changeFold", function(e))
Emitted when a code fold is added or removed.
-Emitted when a code fold is added or removed.
-- EditSession.on("changeFrontMarker", function())
Emitted when a front marker changes.
-Emitted when a front marker changes.
-- EditSession.on("changeMode", function())
Emitted when the current mode changes.
-Emitted when the current mode changes.
-- EditSession.on("changeOverwrite", function())
Emitted when the ability to overwrite text changes, via
-EditSession.setOverwrite.Emitted when the ability to overwrite text changes, via
-EditSession.setOverwrite.- EditSession.on("changeScrollLeft", function(Number scrollLeft))
Emitted when the scroll left changes.
-Emitted when the scroll left changes.
+- EditSession.on("changeAnnotation", function())
Emitted when an annotation changes, like through
+EditSession.setAnnotations().Emitted when an annotation changes, like through
+EditSession.setAnnotations().- EditSession.on("changeBackMarker", function())
Emitted when a back marker changes.
+Emitted when a back marker changes.
+- EditSession.on("changeBreakpoint", function())
Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
+Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
+- EditSession.on("changeFold", function(e))
Emitted when a code fold is added or removed.
+Emitted when a code fold is added or removed.
+- EditSession.on("changeFrontMarker", function())
Emitted when a front marker changes.
+Emitted when a front marker changes.
+- EditSession.on("changeMode", function())
Emitted when the current mode changes.
+Emitted when the current mode changes.
+- EditSession.on("changeOverwrite", function())
Emitted when the ability to overwrite text changes, via
+EditSession.setOverwrite().Emitted when the ability to overwrite text changes, via
+EditSession.setOverwrite().- EditSession.on("changeScrollTop", function(Number scrollTop))
Emitted when the scroll top changes.
-Emitted when the scroll top changes.
+- EditSession.on("changeTabSize", function())
Emitted when the tab size changes, via
-EditSession.setTabSize.Emitted when the tab size changes, via
-EditSession.setTabSize.- EditSession.on("changeWrapLimit", function())
Emitted when the wrapping limit changes.
-Emitted when the wrapping limit changes.
-- EditSession.on("changeWrapMode", function())
Emitted when the wrap mode changes.
-Emitted when the wrap mode changes.
-- EditSession.on("loadMode", function(e))
- EditSession.on("tokenizerUpdate", function(Object e))
Emitted when a background tokenizer asynchronously processes new rows.
-Emitted when a background tokenizer asynchronously processes new rows.
+- EditSession.on("changeTabSize", function())
Emitted when the tab size changes, via
+EditSession.setTabSize().Emitted when the tab size changes, via
+EditSession.setTabSize().- EditSession.on("changeWrapLimit", function())
Emitted when the wrapping limit changes.
+Emitted when the wrapping limit changes.
+- EditSession.on("changeWrapMode", function())
Emitted when the wrap mode changes.
+Emitted when the wrap mode changes.
+- EditSession.on("loadMode", function(e))
- EditSession.on("tokenizerUpdate", function(Object e))
Emitted when a background tokenizer asynchronously processes new rows.
+Emitted when a background tokenizer asynchronously processes new rows.
Arguments
e Object Required. An object containing one property,
"data", that contains information about the changing rowsMethods
- EditSession.$computeWrapSplits(tokens, wrapLimit)
- Internal
- EditSession.$constrainWrapLimit(wrapLimit)
- Internal
- EditSession.$detectNewLine(String text)
- Internal
If
textcontains either the newline (\n) or carriage-return ('\r') characters,$autoNewLinestores that value.If
@@ -75,7 +75,7 @@textcontains either the newline (\n) or carriage-return ('\r') characters,$autoNewLinestores that value.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.
+- 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.
Arguments
docRow Number Required. The document row to check
docColumn Number Required. The document column to check
@@ -95,12 +95,12 @@Returns the
Documentassociated with this session.- EditSession.getDocumentLastRowColumnPosition(docRow, docColumn)
- Internal
- EditSession.getLength()
- Related to Document.getLength
Returns the number of rows in the document.
+- 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
+- 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
+firstRowandlastRow. This function is inclusive oflastRow.- Related to: Document.getLines
Returns an array of strings of the rows between
firstRowandlastRow. This function is inclusive oflastRow.Returns an array of strings of the rows between
firstRowandlastRow. This function is inclusive oflastRow.Arguments
firstRow Number Required. The first row index to retrieve
lastRow Number Required. The final row index to retrieve
@@ -109,14 +109,14 @@Arguments
inFront Boolean Required. If
true, indicates you only want front markers;falseindicates 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.
+- EditSession.getNewLineMode()
- Related to: Document.getNewLineMode
Returns the current new line mode.
Returns the current new line mode.
- EditSession.getOverwrite()
Returns
trueif overwrites are enabled;falseotherwise.Returns
trueif overwrites are enabled;falseotherwise.- 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.
+- 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.
@@ -132,21 +132,21 @@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.
+- 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.
+- 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.
+- 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()
- Related to Document.insert
Inserts a block of
+textand the indicatedposition.- Related to: Document.insert
Inserts a block of
textand the indicatedposition.- Related to Document.insertLines
Arguments
firstRow Number Required. The starting row to move down
+- Related to: Document.insertLines
- Related to Document.insertLines
Shifts all the lines in the document up one, starting from
+firstRowand ending atlastRow.Returns
Number If firstRowis less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1.- Related to: Document.insertLines
Shifts all the lines in the document up one, starting from
firstRowand ending atlastRow.Shifts all the lines in the document up one, starting from
firstRowand ending atlastRow.Arguments
firstRow Number Required. The starting row to move up
lastRow Number Required. The final row to move up
@@ -200,7 +200,7 @@Re-implements a previously undone change to your document.
Arguments
deltas Array Required. An array of previous changes
dontSelect Boolean Required. If
-true, doesn't select the range of where the change occured- Related to Document.remove
Removes the
+rangefrom the document.- Related to: Document.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
-- Related to Document.replace
Replaces a range in the document with the new
+text.- 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 currentrange.startvalue.
If the text is the exact same as what currently exists, this function returns an object containing the currentrange.endvalue.- 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.
+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 currentrange.startvalue.
If the text is the exact same as what currently exists, this function returns an object containing the currentrange.endvalue.- 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.
Arguments
screenRow Number Required. The screen row to check
screenColumn Number Required. The screen column to check
@@ -234,7 +234,7 @@- EditSession.setMode(TextMode mode)
Sets a new text mode for the
EditSession. This method also emits the'changeMode'event. If aBackgroundTokenizeris set, the'tokenizerUpdate'event is also emitted.Sets a new text mode for the
EditSession. This method also emits the'changeMode'event. If aBackgroundTokenizeris 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.
+- 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, orauto- EditSession.setOverwrite(Boolean overwrite)
Pass in
diff --git a/api/editor.html b/api/editor.html index e3df27f9..e2ba8390 100644 --- a/api/editor.html +++ b/api/editor.html @@ -1,31 +1,31 @@ -trueto enable overwrites in your session, orfalseto disable.Editor - Ace API Editor[edit]
- Events (8)
- 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
+Editormanages theEditSession(which managesDocuments), as well as theVirtualRenderer, which draws everything to the screen. Event sessions dealing with the mouse and keyboard are bubbled up fromDocumentto theEditor, which decides what to do with them.Editor - Ace API Editor [edit]
- Events (8)
- 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
Editormanages theEditSession(which managesDocuments), as well as theVirtualRenderer, which draws everything to the screen. Event sessions dealing with the mouse and keyboard are bubbled up fromDocumentto theEditor, which decides what to do with them.Constructors
- new Editor(VirtualRenderer renderer, EditSession session)
Creates a new
Editorobject.Creates a new
Editorobject.Arguments
renderer VirtualRenderer Required. Associated
VirtualRendererthat draws everythingsession EditSession Required. The
-EditSessionto refer toEvents
- Editor.on("blur", function())
Emitted once the editor has been blurred.
-Emitted once the editor has been blurred.
-- Editor.on("change", function(Object e))
Emitted whenever the document is changed.
-Emitted whenever the document is changed.
+Events
- Editor.on("blur", function())
Emitted once the editor has been blurred.
+Emitted once the editor has been blurred.
+- Editor.on("changeSelection", function())
Emitted when the selection changes.
-Emitted when the selection changes.
-- Editor.on("changeSelectionStyle", function(Object data))
Emitted when the selection style changes, via
-Editor.setSelectionStyle.Emitted when the selection style changes, via
+Editor.setSelectionStyle.- Editor.on("changeSelection", function())
Emitted when the selection changes.
+Emitted when the selection changes.
+- Editor.on("changeSelectionStyle", function(Object data))
Emitted when the selection style changes, via
+Editor.setSelectionStyle().Emitted when the selection style changes, via
Editor.setSelectionStyle().Arguments
data Object Required. Contains one property,
-data, which indicates the new selection style- Editor.on("changeSession", function(Object e))
- Editor.on("changeSession", function(Object e))
Emitted whenever the
+EditSessionchanges.Emitted whenever the
EditSessionchanges.Arguments
e Object Required. An object with two properties,
-oldSessionandsession, that represent the old and newEditSessions.- Editor.on("copy", function(String text))
Emitted when text is copied.
-Emitted when text is copied.
+- Editor.on("focus", function())
Emitted once the editor comes into focus.
-Emitted once the editor comes into focus.
-- Editor.on("paste", function(String text))
Emitted when text is pasted.
-Emitted when text is pasted.
+- 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:
@@ -38,23 +38,23 @@- Editor.$updateHighlightActiveLine()
- Internal
- Editor.blockOutdent()
- Related to EditSession.outdentRows
Outdents the current line.
+- 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.- 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.
+- Editor.copyLinesDown()
- 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()
- Related to EditSession.duplicateLines
Copies all the selected lines up one row.
+Returns
Number On success, returns the number of new rows added; in other words, lastRow - firstRow + 1.- Editor.copyLinesUp()
- Related to: EditSession.duplicateLines
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
Attempts to find
+needlewithin the document. For more information onoptions, seeSearch.- Related to: Search.find
Attempts to find
needlewithin the document. For more information onoptions, seeSearch.Attempts to find
needlewithin the document. For more information onoptions, seeSearch.Arguments
needle String Required. The text to search for (optional)
options Object Required. An object defining various search properties
@@ -64,11 +64,11 @@Arguments
needle String Required. The text to find
options Object Required. The search options
additive Boolean Required. keeps
-- Related to Editor.find
Performs another search for
+needlein the document. For more information onoptions, seeSearch.- Related to: Editor.find
- Related to Editor.find
Performs a search for
+needlebackwards. For more information onoptions, seeSearch.- Related to: Editor.find
Performs a search for
needlebackwards. For more information onoptions, seeSearch.Performs a search for
needlebackwards. For more information onoptions, seeSearch.Arguments
options Object Required. search options
animate Boolean Required. If
@@ -82,25 +82,25 @@trueanimate scrollingReturns
trueif 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.
+- Editor.getCursorPosition()
- 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()
- Related to EditSession.documentToScreenPosition
Returns the screen position of the cursor.
+Returns
Object This returns an object that looks something like this:
{ row: currRow, column: currCol }- 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.
+- 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
trueif current lines are always highlighted.Returns
trueif current lines are always highlighted.- Editor.getHighlightSelectedWord()
Returns
trueif currently highlighted words are to be highlighted.Returns
-trueif currently highlighted words are to be highlighted.- Editor.getKeyboardHandler()
- Related to KeyBinding
Returns the keyboard handler.
+- Editor.getKeyboardHandler()
- Related to: KeyBinding
Returns the keyboard handler.
Returns the keyboard handler.
-- Editor.getLastSearchOptions()
- Related to Search.getOptions
Returns an object containing all the search options. For more information on
+options, seeSearch.- Editor.getLastSearchOptions()
- Related to: Search.getOptions
- Editor.getLastVisibleRow()
- Related to VirtualRenderer.getLastVisibleRow
Returns the index of the last visible row.
+- 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
+trueif overwrites are enabled;falseotherwise.- Editor.getOverwrite()
- Related to: EditSession.getOverwrite
Returns
trueif overwrites are enabled;falseotherwise.Returns
trueif overwrites are enabled;falseotherwise.- Editor.getPrintMarginColumn()
Returns the column number of where the print margin is.
Returns the column number of where the print margin is.
@@ -110,7 +110,7 @@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
Returns the
+Rangefor the selected text.- Editor.getSelectionRange()
- Related to: Selection.getRange
- Editor.getSelectionStyle()
Returns the current selection style.
Returns the current selection style.
@@ -122,9 +122,9 @@Returns
trueif invisible characters are being shown.- Editor.getShowPrintMargin()
Returns
trueif the print margin is being shown.Returns
-trueif the print margin is being shown.- Editor.getTheme()
- Related to VirtualRenderer.getTheme
Returns the path of the current theme.
+- 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.
+- 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.
@@ -135,7 +135,7 @@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.
+- Editor.indent()
- Related to: EditSession.indentRows
Indents the current line.
Indents the current line.
- 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.
+- Related to: Selection.moveCursorTo
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.rowandpos.column.- Editor.moveCursorToPosition(Object pos)
- Related to: Selection.moveCursorToPosition
Moves the cursor to the position indicated by
pos.rowandpos.column.Moves the cursor to the position indicated by
pos.rowandpos.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.
+- Editor.moveLinesDown()
- Related to: EditSession.moveLinesDown
Shifts all the selected lines down one row.
- Editor.moveLinesUp()
- Related to EditSession.moveLinesUp
- Editor.moveLinesUp()
- Related to: EditSession.moveLinesUp
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.
+toPositionis an object that looks like this:Returns
Number On success, it returns -1. - Related to: EditSession.moveText
Moves a range of text from the given range to the given position.
toPositionis an object that looks like this:Moves a range of text from the given range to the given position.
toPositionis an object that looks like this:{ row: newRowLocation, column: newColumnLocation }
Arguments
fromRange Range Required. The range of text you want moved within the document
@@ -183,7 +183,7 @@- 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.
+- 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.
Arguments
row Number Required. The new row number
column Number Required. The new column number
@@ -201,12 +201,12 @@- Editor.redo()
- Related to UndoManager.redo
Perform a redo operation on the document, reimplementing the last change.
+- 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
+- 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)
- Editor.resize()
- Related to VirtualRenderer.onResize
Triggers a resize of the editor.
+- 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)
+- 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)
Arguments
line Number Required. The line to scroll to
center Boolean Required. If
trueanimate Boolean Required. If
trueanimates scrollingcallback Function Required. Function to be called when the animation has finished
-- Editor.scrollToRow(Number row)
- Related to VirtualRenderer.scrollToRow
Moves the editor to the specified row.
+- Editor.scrollToRow(Number row)
- Related to: VirtualRenderer.scrollToRow
Moves the editor to the specified row.
- Editor.selectAll()
- Related to Selection.selectAll
Selects all the text in editor.
+- 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.
@@ -273,7 +273,7 @@Arguments
shouldHighlight Boolean Required. Set to
trueto 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
+trueto enable overwrites in your session, orfalseto disable. If overwrites is enabled, any text you enter will type over any text after it. If the value ofoverwritechanges, this function also emites thechangeOverwriteevent.- Editor.setOverwrite(Boolean overwrite)
- Related to: EditSession.setOverwrite
Pass in
trueto enable overwrites in your session, orfalseto disable. If overwrites is enabled, any text you enter will type over any text after it. If the value ofoverwritechanges, this function also emites thechangeOverwriteevent.Pass in
trueto enable overwrites in your session, orfalseto disable. If overwrites is enabled, any text you enter will type over any text after it. If the value ofoverwritechanges, this function also emites thechangeOverwriteevent.Arguments
overwrite Boolean Required. Defines wheter or not to set overwrites
- Editor.setPrintMarginColumn(Number showPrintMargin)
Sets the column defining where the print margin should be.
@@ -300,11 +300,11 @@- Editor.setStyle(style)
- Related to VirtualRenderer.setStyle
Adds a new class,
+style, to the editor.- 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.
themeshould exist, and be a directory path, likeace/theme/textmate.Sets a new theme for the editor.
-themeshould exist, and be a directory path, likeace/theme/textmate.- Related to Document.setValue
Sets the current document to
+val.- Related to: Document.setValue
Sets the current document to
val.Sets the current document to
val.Arguments
val String Required. The new value to set for the document
cursorPos Number Required. Where to set the new value.
@@ -312,7 +312,7 @@undefinedor 0 is selectAll, -1 is at the document start, and 1 is at the endSplits 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.
+- 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.
@@ -323,9 +323,9 @@- Editor.undo()
- Related to UndoManager.undo
Perform an undo operation on the document, reverting the last change. Returns the range of the undo.
+- 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
+stylefrom the editor.- Editor.unsetStyle(style)
- Related to: VirtualRenderer.unsetStyle
Removes the class
stylefrom the editor.Removes the class
stylefrom the editor.- Editor.updateSelectionMarkers()
Updates the cursor and marker layers.
Updates the cursor and marker layers.
diff --git a/api/placeholder.html b/api/placeholder.html index 8f21583a..549bb2b6 100644 --- a/api/placeholder.html +++ b/api/placeholder.html @@ -1,7 +1,7 @@ -PlaceHolder - Ace API TODO
+PlaceHolder - Ace API 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.
+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
diff --git a/api/range.html b/api/range.html index 3738d8eb..af0dbdbe 100644 --- a/api/range.html +++ b/api/range.html @@ -1,7 +1,7 @@ -Range - Ace API 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.
+Range - Ace API 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
Rangeobject with the given starting and ending row and column points.Creates a new
Rangeobject with the given starting and ending row and column points.Arguments
startRow Number Required. The starting row
@@ -28,23 +28,23 @@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:
1if the ending row of the calling range is equal torow, and the ending column of the calling range is equal tocolumn
-1if the starting row of the calling range is equal torow, and the starting column of the calling range is equal tocolumn
Otherwise, it returns the value after callingcompare().- Related to Range.compare
Checks the row and column points of
+pwith the row and column points of the calling range.Returns
Number This method returns one of the following numbers:
1if the ending row of the calling range is equal torow, and the ending column of the calling range is equal tocolumn
-1if the starting row of the calling range is equal torow, and the starting column of the calling range is equal tocolumn
Otherwise, it returns the value after callingcompare().- Related to: Range.compare
Checks the row and column points of
pwith the row and column points of the calling range.Checks the row and column points of
pwith 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:
0if the two points are exactly equal
-1ifp.rowis less then the calling range
1ifp.rowis greater than the calling range
If the starting row of the calling range is equal top.row, and:
p.columnis greater than or equal to the calling range's starting column, this returns0
Otherwise, it returns -1
If the ending row of the calling range is equal top.row, and:
p.columnis less than or equal to the calling range's ending column, this returns0
Otherwise, it returns 1- Related to Range.compare
Compares
+thisrange (A) with another range (B).Returns
Number This method returns one of the following numbers:
0if the two points are exactly equal
-1ifp.rowis less then the calling range
1ifp.rowis greater than the calling range
If the starting row of the calling range is equal top.row, and:
p.columnis greater than or equal to the calling range's starting column, this returns0
Otherwise, it returns -1
If the ending row of the calling range is equal top.row, and:
p.columnis less than or equal to the calling range's ending column, this returns0
Otherwise, it returns 1- Related to: Range.compare
Compares
thisrange (A) with another range (B).Compares
thisrange (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:
0if the two points are exactly equal
-1ifp.rowis less then the calling range
1ifp.rowis greater than the calling range, or ifisStartistrue.
If the starting row of the calling range is equal top.row, and:
p.columnis greater than or equal to the calling range's starting column, this returns0
Otherwise, it returns -1
If the ending row of the calling range is equal top.row, and:
p.columnis less than or equal to the calling range's ending column, this returns0
Otherwise, it returns 1- Related to Range.compare
Returns
+trueif therowandcolumnprovided are within the given range. This can better be expressed as returningtrueif:Returns
Number This method returns one of the following numbers:
0if the two points are exactly equal
-1ifp.rowis less then the calling range
1ifp.rowis greater than the calling range, or ifisStartistrue.
If the starting row of the calling range is equal top.row, and:
p.columnis greater than or equal to the calling range's starting column, this returns0
Otherwise, it returns -1
If the ending row of the calling range is equal top.row, and:
p.columnis less than or equal to the calling range's ending column, this returns0
Otherwise, it returns 1- Related to: Range.compare
Returns
trueif therowandcolumnprovided are within the given range. This can better be expressed as returningtrueif:Returns
trueif therowandcolumnprovided are within the given range. This can better be expressed as returningtrueif:this.start.row <= row <= this.end.row && this.start.column <= column <= this.end.column
Arguments
row Number Required. A row to check for
column Number Required. A column to check for
-- Related to Range.comparePoint
Checks the start and end points of
+rangeand compares them to the calling range. Returnstrueif therangeis contained within the caller's range.- Related to: Range.comparePoint
Checks the start and end points of
rangeand compares them to the calling range. Returnstrueif therangeis contained within the caller's range.Checks the start and end points of
rangeand compares them to the calling range. Returnstrueif therangeis 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.
@@ -55,15 +55,15 @@- Related to Range.compare
Returns
+trueif therowandcolumnare within the given range.- Related to: Range.compare
- Related to Range.compare
Returns
+trueif therowandcolumnare within the given range's ending points.- Related to: Range.compare
- Related to Range.compare
Returns
+trueif therowandcolumnare within the given range's starting points.- Related to: Range.compare
Returns
trueif therowandcolumnare within the given range's starting points.Returns
trueif therowandcolumnare within the given range's starting points.Arguments
row Number Required. A row point to compare with
column Number Required. A column point to compare with
diff --git a/api/renderloop.html b/api/renderloop.html index dc6b5526..45f68085 100644 --- a/api/renderloop.html +++ b/api/renderloop.html @@ -1,7 +1,7 @@ -RenderLoop - Ace API Batches changes (that force something to be redrawn) in the background.
+RenderLoop - Ace API Batches changes (that force something to be redrawn) in the background.
Constructors
- new RenderLoop(onRender, win)
- Internal
Methods
diff --git a/api/resources/csses/ace_api.css b/api/resources/csses/ace_api.css index b703b26b..d36473d5 100644 --- a/api/resources/csses/ace_api.css +++ b/api/resources/csses/ace_api.css @@ -485,7 +485,7 @@ header.filler { .centerpiece { background: url(../images/sidebar_border.png) repeat-y 230px 0; - height: 100%; + min-height: 100%; } /* diff --git a/api/resources/javascripts/ux.js b/api/resources/javascripts/ux.js index 1d03e091..58b1d358 100644 --- a/api/resources/javascripts/ux.js +++ b/api/resources/javascripts/ux.js @@ -1,6 +1,20 @@ $(function () { 'use strict'; + var pagePath = document.location.pathname.substring(document.location.pathname.lastIndexOf("/") + 1); + + // select current page in sidenav and set up prev/next links if they exist + var $selNavLink = $('#sidebar').find('a[href="' + pagePath + '"]'); + if ($selNavLink.length) { + //$selListItem = $selNavLink.closest('li'); + + $selNavLink.addClass('currentItem'); + } + + // init prettyprint + $('pre > code').addClass('prettyprint'); + prettyPrint(); + var baseTitle = document.title, // base (general) part of title pathName = window.location.pathname, @@ -25,25 +39,12 @@ $(function () { }; } - var fileNameRE = new RegExp("^" + fileName, "i"); - - $('a.menuLink').each(function (index) { - if ($(this).attr("href").match(fileNameRE)) { - $(this).addClass("currentItem"); - return false; - } - }); - // init search $('#search') // prevent from form submit .on('submit', function () { return false; }).find('input'); - - // init prettyprint - $('pre > code').addClass('prettyprint'); - prettyPrint(); }); $(document).ready(function () { @@ -83,7 +84,7 @@ $(document).ready(function () { $(this).scrollspy({ min: $classContent.position().top - 35, - max: $classContent.position().top + $classContent.height(), + max: $classContent.position().top + $classContent.height() - 35, onEnter: function (element, position) { var $pagination = $(element); var $paginationContent = $('.membersContent pos' + i); diff --git a/api/scrollbar.html b/api/scrollbar.html index 23c6f022..9753245e 100644 --- a/api/scrollbar.html +++ b/api/scrollbar.html @@ -1,12 +1,12 @@ -About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
ScrollBar - Ace API A set of methods for setting and retrieving the editor's scrollbar.
+ScrollBar - Ace API A set of methods for setting and retrieving the editor's scrollbar.
Constructors
- new ScrollBar(DOMElement parent)
Creates a new
ScrollBar.parentis the owner of the scroll bar.Creates a new
ScrollBar.parentis the owner of the scroll bar.Arguments
parent DOMElement Required. A DOM element
-Events
- ScrollBar.on("scroll", function(Object e))
Emitted when the scroll bar, well, scrolls.
-Emitted when the scroll bar, well, scrolls.
+Events
Methods
- ScrollBar.getWidth()
Returns the width of the scroll bar.
Returns the width of the scroll bar.
diff --git a/api/search.html b/api/search.html index 723f8536..deace184 100644 --- a/api/search.html +++ b/api/search.html @@ -1,7 +1,7 @@ -Search - Ace API A class designed to handle all sorts of text searches within a
+Document.Search - Ace API A class designed to handle all sorts of text searches within a
Document.Constructors
- new Search()
Creates a new
Searchobject. The following search options are avaliable:Creates a new
Searchobject. The following search options are avaliable:-
diff --git a/api/selection.html b/api/selection.html
index 2f826b3b..4b24dcac 100644
--- a/api/selection.html
+++ b/api/selection.html
@@ -1,15 +1,15 @@
-
- Events (2)
- 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
- Events (2)
- 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
- new Selection(EditSession session)
- Selection.on("changeCursor", function())
- Selection.on("changeSelection", function())
- Selection.on("changeCursor", function())
- Selection.on("changeSelection", function())
- Selection.getSelectionAnchor()
- Related to Anchor.getPosition
- Selection.getSelectionAnchor()
- Related to: Anchor.getPosition
- Selection.getSelectionLead()
- Selection.mergeOverlappingRanges()
- Related to EditSession.documentToScreenPosition
- Related to: EditSession.documentToScreenPosition
- Selection.selectAll()
- Selection.selectAWord()
- Related to EditSession.getAWordRange
- Selection.selectAWord()
- Related to: EditSession.getAWordRange
- Selection.selectDown()
- Selection.selectUp()
- Selection.selectWord()
- Related to EditSession.getWordRange
- Selection.selectWord()
- Related to: EditSession.getWordRange
- Selection.selectWordLeft()
- Split.blur()
- Void
- Related to: Editor.blur
- Split.focus()
- Void
- Related to Editor.focus
- Split.focus()
- Void
- Related to: Editor.focus
- Split.getSplits()
- Split.resize()
- Void
- Internal
- Split.setFontSize(Number size)
- Void
- Related to Editor.setFontSize
- Split.resize()
- Void
- Internal
- Split.setFontSize(Number size)
- Void
- Related to: Editor.setFontSize
- Split.setSession(EditSession session, Number idx)
- Void
- Related to Editor.setSession
- Split.setSession(EditSession session, Number idx)
- Void
- Related to: Editor.setSession
- Split.setTheme(String theme)
- Void
- Related to Editor.setTheme
- Split.setTheme(String theme)
- Void
- Related to: Editor.setTheme
- Split.UndoManagerProxy()
- Void
- Internal
- new TokenIterator(EditSession session, Number initialRow, Number initialColumn)
- new UndoManager()
- UndoManager.execute(Object options)
- Void
Selection - Ace API Selection[edit]
Contains the cursor position and the text selection of an edit session.
+Selection - Ace API 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
Selectionobject.Events
Emitted when the cursor position changes.
-Emitted when the cursor position changes.
-Emitted when the cursor selection changes.
-Emitted when the cursor selection changes.
+Events
Emitted when the cursor position changes.
+Emitted when the cursor position changes.
+Emitted when the cursor selection changes.
+Emitted when the cursor selection changes.
Methods
Adds a range to a selection by entering multiselect mode, if necessary.
Adds a range to a selection by entering multiselect mode, if necessary.
Arguments
range Range Required. The new range to add
@@ -20,7 +20,7 @@Gets the current position of the cursor.
Returns an object containing the
+rowandcolumnof the calling selection anchor.Returns an object containing the
rowandcolumnof the calling selection anchor.Returns an object containing the
rowandcolumnof the calling selection anchor.Returns an object containing the
rowandcolumnof the calling selection lead.Returns an object containing the
@@ -32,7 +32,7 @@rowandcolumnof the calling selection lead.Returns
trueif the selection is a multi-line.Merges overlapping ranges ensuring consistency after changes
Merges overlapping ranges ensuring consistency after changes
-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.
Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
Arguments
rows Number Required. The number of rows to move by
chars Number Required. The number of characters to move by
@@ -76,7 +76,7 @@includeEmptyLines Boolean Required. If true, this includes ranges inside the block which are empty due to clipping
Selects all the text in the document.
Selects all the text in the document.
-Selects a word, including its right whitespace.
+Selects a word, including its right whitespace.
Selects a word, including its right whitespace.
Moves the selection down one row.
Moves the selection down one row.
@@ -103,7 +103,7 @@Arguments
pos Object Required. An object containing the row and column
Moves the selection up one row.
Moves the selection up one row.
-Moves the selection to highlight the entire word.
+Moves the selection to highlight the entire word.
Moves the selection to highlight the entire word.
Moves the selection to the first word on the left.
Moves the selection to the first word on the left.
diff --git a/api/split.html b/api/split.html index c9dde6a2..d3d6d206 100644 --- a/api/split.html +++ b/api/split.html @@ -1,12 +1,12 @@ -Split - Ace API Constructors
Arguments
container Document Required. The document to associate with the split
+Split - Ace API Methods
Blurs the current editor.
Blurs the current editor.
-Focuses the current editor.
+Focuses the current editor.
Focuses the current editor.
Returns the number of splits.
Returns the number of splits.
-Sets the font size, in pixels, for all the available editors.
+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
Sets a new
+EditSessionfor the indicated editor.Sets a new
EditSessionfor the indicated editor.Sets a new
EditSessionfor the indicated editor.Arguments
session EditSession Required. The new edit session
idx Number Required. The editor's index you're interested in
Sets a theme for each of the available editors.
+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
diff --git a/api/token_iterator.html b/api/token_iterator.html index 2591976d..99d71067 100644 --- a/api/token_iterator.html +++ b/api/token_iterator.html @@ -1,7 +1,7 @@ -About Cloud9 | Ace & Cloud9 IDE are © Ajax.org 2012
TokenIterator - Ace API This class provides an essay way to treat the document as a stream of tokens, and provides methods to iterate over these tokens.
+TokenIterator - Ace API This class provides an essay way to treat the document as a stream of tokens, and provides methods to iterate over these tokens.
Constructors
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
diff --git a/api/tokenizer.html b/api/tokenizer.html index 5dfeae94..d7b979cb 100644 --- a/api/tokenizer.html +++ b/api/tokenizer.html @@ -1,7 +1,7 @@ -Tokenizer - Ace API This class takes a set of highlighting rules, and creates a tokenizer out of them. For more information, see the wiki on extending highlighters.
+Tokenizer - Ace API 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
Constructs a new tokenizer based on the given rules and flags.
Constructs a new tokenizer based on the given rules and flags.
Arguments
rules Object Required. The highlighting rules
diff --git a/api/undomanager.html b/api/undomanager.html index 37273d66..aed3394c 100644 --- a/api/undomanager.html +++ b/api/undomanager.html @@ -1,7 +1,7 @@ -UndoManager - Ace API This object maintains the undo stack for an
+EditSession.UndoManager - Ace API This object maintains the undo stack for an
EditSession.Constructors
Resets the current undo state and creates a new
UndoManager.Resets the current undo state and creates a new
UndoManager.Methods
Provides a means for implementing your own undo manager.
diff --git a/api/virtual_renderer.html b/api/virtual_renderer.html index ff108356..8341457f 100644 --- a/api/virtual_renderer.html +++ b/api/virtual_renderer.html @@ -1,7 +1,7 @@ -optionshas one property,args, anArray, with two elements:VirtualRenderer - Ace API